From 24e9eda6446523f4d9a5353e22e27bf0cf84443b Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Sun, 1 Mar 2020 00:58:50 +0200 Subject: [PATCH] Fixed crash where the cursor was failing to load The issue still exists though, but instead of crashing, the cursor just doesn't change. Probably a Godot bug? --- Scripts/Canvas.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index f8c2c797f..c507ee109 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -251,7 +251,8 @@ func _input(event : InputEvent) -> void: Global.cursor_position_label.text = "[%s×%s] %s, %s" % [size.x, size.y, mouse_pos_floored.x, mouse_pos_floored.y] if !cursor_inside_canvas: cursor_inside_canvas = true - Input.set_custom_mouse_cursor(Global.cursor_image, 0, Vector2(15, 15)) + if Global.cursor_image.get_data().get_size() != Vector2.ZERO: + Input.set_custom_mouse_cursor(Global.cursor_image, 0, Vector2(15, 15)) if Global.show_left_tool_icon: Global.left_cursor.visible = true if Global.show_right_tool_icon: