diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/control.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 50ffc0509c..68af7af5d4 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -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(); } |