Co-authored-by: sriramun <[email protected]> (cherry picked from commit 08e804b3b718862e92e6b296b914e3829e43717e)
@@ -172,6 +172,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();