Merge pull request #17236 from marcelofg55/custom_theme_crashfix

Fix for a possible crash when a custom theme is not loaded properly
This commit is contained in:
Hein-Pieter van Braam 2018-03-04 01:04:05 +01:00 committed by GitHub
commit 184b2fe21b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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