Преглед на файлове

Merge pull request #5234 from Paulb23/fix_error_tab_print

Fixed error: set_current_tab print on project open
Rémi Verschelde преди 9 години
родител
ревизия
360cebaf23
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      scene/gui/tab_container.cpp

+ 3 - 2
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;
 	}
 }