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 more segfaults in mouse.cpp lambdas #574

Merged
merged 1 commit into from
Mar 29, 2020

Conversation

Timmmm
Copy link
Contributor

@Timmmm Timmmm commented Mar 28, 2020

This changes all the lambdas to have explicit captures, since the use of implicit captures has led to some memory errors, especially segfaults in the right-click menu.

I'm not 100% sure that the code is correct anyway - it really needs auditing to ensure all referenced values are still valid when the menu item is clicked (e.g. can you change stuff with keyboard shortcuts while the context menu is visible?), but it should at least be more correct!

This changes all the lambdas to have explicit captures, since the use of implicit captures has led to some memory errors, especially segfaults in the right-click menu.

I'm not 100% sure that the code is correct anyway - it really needs auditing to ensure all referenced values are still valid when the menu item is clicked (e.g. can you change stuff with keyboard shortcuts while the context menu is visible?), but it should at least be *more* correct!
@CLAassistant
Copy link

CLAassistant commented Mar 28, 2020

CLA assistant check
All committers have signed the CLA.

@whitequark
Copy link
Contributor

it really needs auditing to ensure all referenced values are still valid when the menu item is clicked

I wrote that code and the values should be still valid. You should definitely not be able to change anything with keyboard shortcuts, at least.

Sorry, something went wrong.

@whitequark whitequark merged commit 6471710 into solvespace:master Mar 29, 2020
devin-ai-integration bot pushed a commit to erkinalp/solvespace that referenced this pull request Apr 3, 2025
This changes all the lambdas to have explicit captures, since the use of
implicit captures has led to some memory errors, especially segfaults in
the right-click menu.

I'm not 100% sure that the code is correct anyway - it really needs auditing
to ensure all referenced values are still valid when the menu item is clicked
(e.g. can you change stuff with keyboard shortcuts while the context menu is
visible?), but it should at least be *more* correct!
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.

None yet

3 participants