summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-12-17 19:11:59 +0100
committerGitHub <noreply@github.com>2021-12-17 19:11:59 +0100
commit52217244f4008367e441944c578f59506b914f8f (patch)
tree37d08d981d816f9e3128cce5e8509191f4e44cfa
parent58712e96aea12bda2d5111d96961f529d15a693c (diff)
parent5c3b92e94fa5d2b23c1497c31cbc3600f736fd8f (diff)
Merge pull request #56023 from Zylann/null_checks
-rw-r--r--editor/import/resource_importer_texture.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index b1fa2eda28..5ca61e4c39 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -37,6 +37,8 @@
#include "editor/editor_node.h"
void ResourceImporterTexture::_texture_reimport_roughness(const Ref<StreamTexture2D> &p_tex, const String &p_normal_path, RS::TextureDetectRoughnessChannel p_channel) {
+ ERR_FAIL_COND(p_tex.is_null());
+
MutexLock lock(singleton->mutex);
StringName path = p_tex->get_path();
@@ -51,6 +53,8 @@ void ResourceImporterTexture::_texture_reimport_roughness(const Ref<StreamTextur
}
void ResourceImporterTexture::_texture_reimport_3d(const Ref<StreamTexture2D> &p_tex) {
+ ERR_FAIL_COND(p_tex.is_null());
+
MutexLock lock(singleton->mutex);
StringName path = p_tex->get_path();
@@ -63,6 +67,8 @@ void ResourceImporterTexture::_texture_reimport_3d(const Ref<StreamTexture2D> &p
}
void ResourceImporterTexture::_texture_reimport_normal(const Ref<StreamTexture2D> &p_tex) {
+ ERR_FAIL_COND(p_tex.is_null());
+
MutexLock lock(singleton->mutex);
StringName path = p_tex->get_path();