summaryrefslogtreecommitdiff
path: root/editor/import/resource_importer_scene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/import/resource_importer_scene.cpp')
-rw-r--r--editor/import/resource_importer_scene.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index af766128b0..95445693b4 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -952,7 +952,10 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
for (int i = 0; i < mesh->get_surface_count(); i++) {
mat = mesh->surface_get_material(i);
- if (!mat.is_valid() || mat->get_name() == "")
+
+ if (!mat.is_valid())
+ continue;
+ if (mat->get_name() == "")
continue;
if (!p_materials.has(mat)) {