Explorar o código

Merge pull request #17236 from marcelofg55/custom_theme_crashfix

Fix for a possible crash when a custom theme is not loaded properly
Hein-Pieter van Braam %!s(int64=7) %!d(string=hai) anos
pai
achega
184b2fe21b
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      editor/editor_themes.cpp

+ 3 - 1
editor/editor_themes.cpp

@@ -1139,7 +1139,9 @@ Ref<Theme> create_custom_theme(const Ref<Theme> p_theme) {
 	String custom_theme = EditorSettings::get_singleton()->get("interface/theme/custom_theme");
 	if (custom_theme != "") {
 		theme = ResourceLoader::load(custom_theme);
-	} else {
+	}
+
+	if (!theme.is_valid()) {
 		theme = create_editor_theme(p_theme);
 	}