-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
[3.x] Fix TexturePreview
crashing
#50745
[3.x] Fix TexturePreview
crashing
#50745
Conversation
TexturePreview
crashingTexturePreview
crashing
You should still use Font can still be invalid if, for example, someone uses a custom theme resource with that theme item not being set. With a check we can avoid the crash with a graceful behavior. |
For some reason
Hmm, but then how come in the 18 other cases that do something similar ( Edit: see #50746 (comment) |
0947b71
to
8e90c7e
Compare
Does it matter if it's common or not if it's a one line fix for a feature we are supposed to support? 🙃
It is a mistake, the signal is also sent when you change one of the predefined themes, or change configurable properties of the predefined themes. There are some parts of the editor that ignore that fact, and it's a bug every time.
Most of the time we don't manually copy or touch the items returned from the theme and just pass them to the local override/property setter, where invalid values are handled either way. But I haven't checked all the 18 occurrences that you speak of, there may be possible crashes there as well. The workaround is fine as a solution for the immediate problem, but I still think that graceful handling of properties that can be configured by the end user is a better approach overall, and other places may benefit from it too. |
Thanks! |
Fixes #50702 for
3.x