diff options
Diffstat (limited to 'platform/osx/os_osx.mm')
-rw-r--r-- | platform/osx/os_osx.mm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 79d7ec410a..c0de4e3f2a 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -30,15 +30,15 @@ #include "os_osx.h" +#include "core/os/keyboard.h" +#include "core/print_string.h" +#include "core/version_generated.gen.h" #include "dir_access_osx.h" #include "drivers/gles2/rasterizer_gles2.h" #include "drivers/gles3/rasterizer_gles3.h" #include "main/main.h" -#include "os/keyboard.h" -#include "print_string.h" #include "sem_osx.h" #include "servers/visual/visual_server_raster.h" -#include "version_generated.gen.h" #include <mach-o/dyld.h> @@ -1604,7 +1604,9 @@ void OS_OSX::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c } ERR_FAIL_COND(!texture.is_valid()); + ERR_FAIL_COND(p_hotspot.x < 0 || p_hotspot.y < 0); ERR_FAIL_COND(texture_size.width > 256 || texture_size.height > 256); + ERR_FAIL_COND(p_hotspot.x > texture_size.width || p_hotspot.y > texture_size.height); image = texture->get_data(); |