Merge pull request #70007 from timothyqiu/nan-scale

Fix crash after executing `ItemList.set_icon_scale`
This commit is contained in:
Rémi Verschelde 2022-12-13 14:13:15 +01:00
commit a3b60d9186
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1550,6 +1550,7 @@ bool ItemList::get_allow_reselect() const {
} }
void ItemList::set_icon_scale(real_t p_scale) { void ItemList::set_icon_scale(real_t p_scale) {
ERR_FAIL_COND(!Math::is_finite(p_scale));
icon_scale = p_scale; icon_scale = p_scale;
} }