From 8018dc6599d98e0fb603eba9332cfffd4db0ce20 Mon Sep 17 00:00:00 2001 From: Marcelo Fernandez Date: Sat, 3 Mar 2018 20:46:36 -0300 Subject: [PATCH] Fix for a possible crash when a custom theme is not loaded properly (cherry picked from commit 2f1429eb24705410bcfb1c106fe12160e444cc37) --- editor/editor_themes.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 096a60afa33..b10f785a28b 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -1139,7 +1139,9 @@ Ref create_custom_theme(const Ref 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); }