Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix possible crash #2120

Merged
merged 1 commit into from
Jul 15, 2024
Merged

Conversation

wawanbreton
Copy link
Contributor

To compute the end type, we previously used a lambda function, that was declared static. Thus, the arguments were apparently captured when calling it the first time, and didn't change for subsequent calls. As one of them is a pointer, this could crash if the pointed object had been destroyed in the meantime.

Although the minimum fix is just to remove the static for the function, I removed the function itself because it really doesn't make sense anymore in this context.

CURA-12042

To compute the end type, we previously used a lambda function, that was
declared static. Thus, the arguments were apparently captured when
calling it the first time, and didn't change for subsequent calls. As
one of them is a pointer, this could crash if the pointed object had
been destroyed in the meantime.
Although the minimum fix is just to remove the static for the function,
I removed the function itself because it really doesn't make sense
anymore in this context.

CURA-12042
@HellAholic HellAholic merged commit 1d310b8 into 5.8 Jul 15, 2024
27 checks passed
@HellAholic HellAholic deleted the CURA-12042_engine_crash_with_one_at_a_time branch July 15, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants