summaryrefslogtreecommitdiffstats
path: root/drivers/gles3/storage/material_storage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/storage/material_storage.cpp')
-rw-r--r--drivers/gles3/storage/material_storage.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index aa6319f0ef..a36004209b 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -1957,14 +1957,16 @@ void MaterialStorage::global_shader_parameters_load_settings(bool p_load_texture
if (gvtype >= RS::GLOBAL_VAR_TYPE_SAMPLER2D) {
//textire
if (!p_load_textures) {
- value = RID();
continue;
}
String path = value;
- Ref<Resource> resource = ResourceLoader::load(path);
- ERR_CONTINUE(resource.is_null());
- value = resource;
+ if (path.is_empty()) {
+ value = RID();
+ } else {
+ Ref<Resource> resource = ResourceLoader::load(path);
+ value = resource;
+ }
}
if (global_shader_uniforms.variables.has(name)) {