diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 82f089735d3..c44feddd388 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; }