diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-04-14 00:12:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-14 00:12:51 +0200 |
commit | bd9ba4bd10d7aa1f18b8b46fa0acf468e69710c3 (patch) | |
tree | 721f1b9e45545afe226533ceecee360472b77bea /core/input | |
parent | 970debed93fd172776914b9482e2c110e01a1ac1 (diff) | |
parent | 29a2809d2120bc740f948e4134e839557e689724 (diff) |
Merge pull request #60208 from Magorx/input-set-custom-mouse-cursor-fix
Added p_shape check to avoid engine crash in DisplayServer
Diffstat (limited to 'core/input')
-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 343076b4e1..0db20a7c82 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -855,6 +855,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); } |