From 1939e83a653b3263eeac820a9e36d751a314068b Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 8 Aug 2017 07:13:17 -0300 Subject: Attempt to resolve #4673 --- editor/plugins/canvas_item_editor_plugin.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index f5d9da195a..a10a367db8 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1390,7 +1390,12 @@ void CanvasItemEditor::_viewport_gui_input(const Ref &p_event) { while ((n && n != scene && n->get_owner() != scene) || (n && !n->is_class("CanvasItem"))) { n = n->get_parent(); }; - c = n->cast_to(); + + if (n) { + c = n->cast_to(); + } else { + c = NULL; + } // Select the item additive_selection = b->get_shift(); -- cgit v1.2.3