Browse Source

Fix crash after executing ItemList.set_icon_scale

Haoyu Qiu 2 years ago
parent
commit
8d0fa193c3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      scene/gui/item_list.cpp

+ 1 - 0
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;
 }