From 78372765971554e95fb39e14e2519161208626e1 Mon Sep 17 00:00:00 2001 From: qarmin Date: Thu, 7 Mar 2019 16:09:02 +0100 Subject: [PATCH] Fix error when dragging empty script list in Script Editor --- editor/plugins/script_editor_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 9e65d9de100..e648fa0820c 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2206,6 +2206,9 @@ void ScriptEditor::_script_split_dragged(float) { Variant ScriptEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) { + if (tab_container->get_child_count() == 0) + return Variant(); + Node *cur_node = tab_container->get_child(tab_container->get_current_tab()); HBoxContainer *drag_preview = memnew(HBoxContainer);