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 const detection with two ways binding #2192

Merged
merged 1 commit into from Feb 7, 2023
Merged

Conversation

ogoffart
Copy link
Member

@ogoffart ogoffart commented Feb 6, 2023

The const detection for two way binding was not detecting change if one of the property was set to a const value in a component using it.

This would cause the compiler to generate call set_content on one of the property in a two way bindings, and later, the "const sentinel" be present in the dependency list, causing crash.

To avoid segfault for similar bug in the future, added added an assert! in the property system to detect that.

Fixes #2185

The const detection for two way binding was not detecting change if one
of the property was set to a const value in a component using it.

This would cause the compiler to generate call set_content on one of the
property in a two way bindings, and later, the "const sentinel" be
present in the dependency list, causing crash.

To avoid segfault for similar bug in the future, added added an assert!
in the property system to detect that.

Fixes #2185
@ogoffart ogoffart merged commit dddfcf5 into master Feb 7, 2023
@ogoffart ogoffart deleted the olivier/fix-2185 branch March 9, 2023 07:28
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.

Segfault when combining conditional widget with two-directional binding
2 participants