diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-08-08 07:13:17 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-08-08 07:13:17 -0300 |
commit | 1939e83a653b3263eeac820a9e36d751a314068b (patch) | |
tree | fda05df55dd9b36a50f9ceff7e660e5d99f8d60a /editor | |
parent | f6ad0ccc63189958c87fdcd2fa03aa208ff98bd9 (diff) |
Attempt to resolve #4673
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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<InputEvent> &p_event) { while ((n && n != scene && n->get_owner() != scene) || (n && !n->is_class("CanvasItem"))) { n = n->get_parent(); }; - c = n->cast_to<CanvasItem>(); + + if (n) { + c = n->cast_to<CanvasItem>(); + } else { + c = NULL; + } // Select the item additive_selection = b->get_shift(); |