From 670d07ca0dbf9add2d8a96cd2a3f14b99be9cd23 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 8 Aug 2017 07:13:17 -0300 Subject: [PATCH] Attempt to resolve #4673 (cherry picked from commit 1939e83a653b3263eeac820a9e36d751a314068b) --- editor/plugins/canvas_item_editor_plugin.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index fabb67e310a..d504655597b 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1459,10 +1459,12 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent &p_event) { while ((n && n != scene && n->get_owner() != scene) || (n && !n->is_type("CanvasItem"))) { n = n->get_parent(); }; - c = n->cast_to(); -#if 0 - if ( b.pressed ) box_selection_start( click ); -#endif + + if (n) { + c = n->cast_to(); + } else { + c = NULL; + } additive_selection = b.mod.shift; if (!_select(c, click, additive_selection))