Do not error flood if removing default environment. Closes #9945

This commit is contained in:
Juan Linietsky 2017-08-31 08:55:20 -03:00
parent 6f762ad709
commit 4d4c1dfc1b

View file

@ -542,6 +542,10 @@ bool SceneTree::idle(float p_time) {
if (env_path != String()) { if (env_path != String()) {
fallback = ResourceLoader::load(env_path); fallback = ResourceLoader::load(env_path);
if (fallback.is_null()) {
//could not load fallback, set as empty
ProjectSettings::get_singleton()->set("rendering/environment/default_environment", "");
}
} else { } else {
fallback.unref(); fallback.unref();
} }