From aad6bdad946e54e567d6cd22abfa2d829db6b871 Mon Sep 17 00:00:00 2001 From: Guilherme Felipe Date: Sun, 27 May 2018 20:55:05 -0300 Subject: Add validation in set_custom_mouse_cursor Check if the image is valid. --- platform/windows/os_windows.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'platform/windows/os_windows.cpp') diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 8d664b5832..0e42a20dd7 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2074,6 +2074,7 @@ void OS_Windows::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shap ERR_FAIL_COND(!texture.is_valid()); ERR_FAIL_COND(texture_size.width > 256 || texture_size.height > 256); + ERR_FAIL_COND(!image.is_valid()); image = texture->get_data(); -- cgit v1.2.3