Fix crash after executing ItemList.set_icon_scale

(cherry picked from commit 8d0fa193c344be8e1ec801b1a45341801b80a5f8)
This commit is contained in:
Haoyu Qiu 2022-12-13 15:38:33 +08:00 committed by Relintai
parent c63ffb357b
commit e75af6af1d

View File

@ -1275,6 +1275,7 @@ bool ItemList::get_allow_reselect() const {
}
void ItemList::set_icon_scale(real_t p_scale) {
ERR_FAIL_COND(Math::is_nan(p_scale) || Math::is_inf(p_scale));
icon_scale = p_scale;
}