mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-03-24 13:17:33 +01:00
Fix infinite loop when calling Control.popup_centered_minsize()
Co-authored-by: sriramun <sriramun2@gmail.com> (cherry picked from commit 08e804b3b718862e92e6b296b914e3829e43717e)
This commit is contained in:
parent
289b16fa7b
commit
b1c99f29e3
@ -175,6 +175,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;
|
||||
minimum_size_changed();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user