Fix for a possible crash when a custom theme is not loaded properly

(cherry picked from commit 2f1429eb24)
This commit is contained in:
Marcelo Fernandez 2018-03-03 20:46:36 -03:00 committed by Hein-Pieter van Braam
parent aaed3ef5ed
commit 8018dc6599
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}