From 29a2809d2120bc740f948e4134e839557e689724 Mon Sep 17 00:00:00 2001 From: KingCakeTheFruity Date: Wed, 13 Apr 2022 14:50:30 +0300 Subject: Added p_shape check to avoid engine crush --- core/input/input.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); } -- cgit v1.2.3