summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-06-19 13:00:12 +0200
committerGitHub <noreply@github.com>2016-06-19 13:00:12 +0200
commit360cebaf23e8d4dd8c701184214d4a6802cc587e (patch)
tree22c308c6bca29c72d753059c26b1f516e15ea890 /scene/gui
parent57e1387199c96473007bfa2d430e8cf6cedfc5ff (diff)
parenta3481ed1c780ac983d474d97af68f7175f296116 (diff)
Merge pull request #5234 from Paulb23/fix_error_tab_print
Fixed error: set_current_tab print on project open
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/tab_container.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 37c68a295d..5eb579f1d2 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -412,8 +412,9 @@ void TabContainer::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
-
- call_deferred("set_current_tab",get_current_tab()); //wait until all changed theme
+ if (get_tab_count() > 0) {
+ call_deferred("set_current_tab",get_current_tab()); //wait until all changed theme
+ }
} break;
}
}