-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Add size check in Control::_edit_set_state() to fix crash #46620
Add size check in Control::_edit_set_state() to fix crash #46620
Conversation
This method will also crash when the passed Dictionary is missing any of the used keys, e.g. So to fix this properly, you'd have to add a check for each existence of each key. I wonder if it's worth it though, the method isn't visible in documentation. It's mean for internal use only (see godotengine/godot-proposals#2285) and we didn't have crash reports from editor usage (and even if we had, the error doesn't help much as it still needs to be fixed). |
022f289
to
d92b37e
Compare
d92b37e
to
ef1d58f
Compare
Thanks! |
|
Reverted with 372b1b8 (and undid cherry-pick before pushing) as the change is wrong:
Try to move any Control, this change spams:
|
Right, I didn't test it in the editor before approving and was surprised it works .-. This should be |
fixes #46017
add size check to prevent crash when executing
Control.new()._edit_set_state({})