summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2018-03-04 01:04:05 +0100
committerGitHub <noreply@github.com>2018-03-04 01:04:05 +0100
commit184b2fe21bbc5fcd3c577ca6d079f6f5f70b7943 (patch)
tree2055460793e963a3297dd7d5c158a081dbab3ed1 /editor
parentcf0bc13588a28401058d744abd6673c6974377eb (diff)
parent2f1429eb24705410bcfb1c106fe12160e444cc37 (diff)
Merge pull request #17236 from marcelofg55/custom_theme_crashfix
Fix for a possible crash when a custom theme is not loaded properly
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_themes.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 096a60afa3..b10f785a28 100644
--- a/editor/editor_themes.cpp
+++ b/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);
}