summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2022-12-13 15:38:33 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2022-12-13 15:53:50 +0800
commit8d0fa193c344be8e1ec801b1a45341801b80a5f8 (patch)
tree532c49aa5a3d77c2c05619d88e9abcacb56f4eb4 /scene/gui
parent4828ac6b9931ee2ea606cf47c68604b1a2b2d3ed (diff)
Fix crash after executing ItemList.set_icon_scale
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/item_list.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 82f089735d..c44feddd38 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -1550,6 +1550,7 @@ bool ItemList::get_allow_reselect() const {
}
void ItemList::set_icon_scale(real_t p_scale) {
+ ERR_FAIL_COND(!Math::is_finite(p_scale));
icon_scale = p_scale;
}