diff options
| author | qarmin <mikrutrafal54@gmail.com> | 2019-03-07 16:09:02 +0100 |
|---|---|---|
| committer | qarmin <mikrutrafal54@gmail.com> | 2019-03-07 16:09:02 +0100 |
| commit | 78372765971554e95fb39e14e2519161208626e1 (patch) | |
| tree | ef00df94ea6a28f38cec76f2b8517f84f5c97c47 | |
| parent | 2940475c716eab517ca52957acc8714f195d32cb (diff) | |
| download | redot-engine-78372765971554e95fb39e14e2519161208626e1.tar.gz | |
Fix error when dragging empty script list in Script Editor
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 9e65d9de10..e648fa0820 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); |
