diff --git a/core/input/input.cpp b/core/input/input.cpp index e64b5a3ab70..12c715a64c4 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); }