mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 22:23:07 +00:00
Merge pull request #61855 from Calinou/popup-centered-minsize-fix-freeze
Fix infinite loop when calling `Control.popup_centered_minsize()`
This commit is contained in:
commit
92dfa7901b
@ -1563,6 +1563,12 @@ void Control::set_custom_minimum_size(const Size2 &p_custom) {
|
||||
if (p_custom == data.custom_minimum_size) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isnan(p_custom.x) || isnan(p_custom.y)) {
|
||||
// Prevent infinite loop.
|
||||
return;
|
||||
}
|
||||
|
||||
data.custom_minimum_size = p_custom;
|
||||
update_minimum_size();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user