Fix crash after executing ItemList.set_icon_scale

(cherry picked from commit 8d0fa193c3)
This commit is contained in:
Haoyu Qiu 2022-12-13 15:38:33 +08:00 committed by Rémi Verschelde
parent 5797b2f437
commit 6f69d29398
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 0 deletions

View File

@ -1274,6 +1274,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;
}