diff options
author | KingCakeTheFruity <maxim.gorishniy@gmail.com> | 2022-04-13 14:50:30 +0300 |
---|---|---|
committer | KingCakeTheFruity <maxim.gorishniy@gmail.com> | 2022-04-13 14:50:30 +0300 |
commit | 29a2809d2120bc740f948e4134e839557e689724 (patch) | |
tree | ffc0a4f55035eb61d327314af4357f7b91c60e97 | |
parent | 338b23d57224ecd04eaff4763a7ba493ffa6cb3d (diff) |
Added p_shape check to avoid engine crush
-rw-r--r-- | core/input/input.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp index e64b5a3ab7..12c715a64c 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -851,6 +851,8 @@ void Input::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, co return; } + ERR_FAIL_INDEX(p_shape, CursorShape::CURSOR_MAX); + set_custom_mouse_cursor_func(p_cursor, p_shape, p_hotspot); } |