Fix crash with bogus shape index to DisplayServer.cursor_set_custom_image()
Fixes #66605.
This commit is contained in:
parent
f0c9ed4b55
commit
4574b97752
5 changed files with 9 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue