1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

Fix infinite loop when calling Control.popup_centered_minsize()

Co-authored-by: sriramun <sriramun2@gmail.com>
(cherry picked from commit 08e804b3b7)
This commit is contained in:
Hugo Locurcio
2022-06-09 20:19:27 +02:00
committed by Rémi Verschelde
parent 245b246659
commit 4c83336a3d

View File

@@ -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();
}