Fix error when dragging empty script list in Script Editor
This commit is contained in:
parent
2940475c71
commit
7837276597
@ -2206,6 +2206,9 @@ void ScriptEditor::_script_split_dragged(float) {
|
|||||||
|
|
||||||
Variant ScriptEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
|
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());
|
Node *cur_node = tab_container->get_child(tab_container->get_current_tab());
|
||||||
|
|
||||||
HBoxContainer *drag_preview = memnew(HBoxContainer);
|
HBoxContainer *drag_preview = memnew(HBoxContainer);
|
||||||
|
Loading…
Reference in New Issue
Block a user