From 9f308a5bf33d0242268a56699beea99d96b0dcea Mon Sep 17 00:00:00 2001 From: Ian Date: Mon, 20 Nov 2017 09:49:07 -0500 Subject: [PATCH] fix linux crash in _update_scene_tabs --- editor/editor_node.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 65590481725..ded12db7662 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -157,7 +157,9 @@ void EditorNode::_update_scene_tabs() { tabbar_container->remove_child(scene_tab_add); scene_tabs->add_child(scene_tab_add); } - Rect2 last_tab = scene_tabs->get_tab_rect(scene_tabs->get_tab_count() - 1); + Rect2 last_tab = Rect2(); + if (scene_tabs->get_tab_count() != 0) + last_tab = scene_tabs->get_tab_rect(scene_tabs->get_tab_count() - 1); scene_tab_add->set_position(Point2(last_tab.get_position().x + last_tab.get_size().x + 3, last_tab.get_position().y)); } }