diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-17 16:20:19 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-17 16:20:19 +0100 |
commit | 633d9e6327d6a6e0d45c5cc011ff813a37abc530 (patch) | |
tree | 188dcfd9be85729bc2c878d89b8351b62317d57a /platform/linuxbsd/x11/display_server_x11.cpp | |
parent | 0f72c77cd43940df372d66ce1cadfa3d5fe88d6a (diff) | |
parent | 4574b97752af4631a24121b4620786033a4f8651 (diff) |
Merge pull request #73500 from akien-mga/out-of-shape
Fix crash with bogus shape index to DisplayServer.cursor_set_custom_image()
Diffstat (limited to 'platform/linuxbsd/x11/display_server_x11.cpp')
-rw-r--r-- | platform/linuxbsd/x11/display_server_x11.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index 896b7b95eb..00547c4560 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -2599,6 +2599,8 @@ DisplayServerX11::CursorShape DisplayServerX11::cursor_get_shape() const { void DisplayServerX11::cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { _THREAD_SAFE_METHOD_ + ERR_FAIL_INDEX(p_shape, CURSOR_MAX); + if (p_cursor.is_valid()) { HashMap<CursorShape, Vector<Variant>>::Iterator cursor_c = cursors_cache.find(p_shape); |