diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-13 14:13:15 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-13 14:13:15 +0100 |
commit | a3b60d9186a47cfe2919f88b415a3d083664b7cd (patch) | |
tree | 3fe98435380fe6a82abaa675adc795702d4c31e9 /scene | |
parent | c8b6c44c3c68dfab9f171d4c5d16b75bf786e2d0 (diff) | |
parent | 8d0fa193c344be8e1ec801b1a45341801b80a5f8 (diff) |
Merge pull request #70007 from timothyqiu/nan-scale
Fix crash after executing `ItemList.set_icon_scale`
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/item_list.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 82f089735d..c44feddd38 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; } |