Skip to content

Conversation

@zekexiao
Copy link

@zekexiao zekexiao commented Dec 2, 2025

Type of change

  • Bug fix
  • [ ] New feature
  • [ ] Breaking change
  • [ ] Documentation/refactoring

Description

fix crash when node flags updated after delete node, lambda capture this but no context this so Qt signals will not auto disconnect, setLockedState is use after free

Copy link
Collaborator

@tatatupi tatatupi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix.
The previous connection was not connecting to a receiver, only to a lambda. So if the node was deleted, the lambda would still be valid and cause a crash.
With the fix, when the object is destroyed, Qt automatically disconnects the slot.

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.

2 participants