summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrune-scape <spartacrafter@gmail.com>2024-06-17 17:28:32 -0700
committerrune-scape <spartacrafter@gmail.com>2024-06-17 18:13:09 -0700
commitb303e73877764e33037a269b7c7092cf6f11f680 (patch)
tree50bf35afed0cabcca57dc089f74c7f48bdc96b0f
parent8c70c18132441d11a88dd96b462d89d8eba4c2f5 (diff)
downloadredot-engine-b303e73877764e33037a269b7c7092cf6f11f680.tar.gz
avoid crashing when scene import settings are empty
-rw-r--r--editor/import/3d/resource_importer_scene.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/import/3d/resource_importer_scene.cpp b/editor/import/3d/resource_importer_scene.cpp
index c0d38af26a..22caf6e18d 100644
--- a/editor/import/3d/resource_importer_scene.cpp
+++ b/editor/import/3d/resource_importer_scene.cpp
@@ -2780,6 +2780,7 @@ Node *ResourceImporterScene::pre_import(const String &p_source_file, const HashM
}
ERR_FAIL_COND_V(!importer.is_valid(), nullptr);
+ ERR_FAIL_COND_V(p_options.is_empty(), nullptr);
Error err = OK;
@@ -2838,6 +2839,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
}
ERR_FAIL_COND_V(!importer.is_valid(), ERR_FILE_UNRECOGNIZED);
+ ERR_FAIL_COND_V(p_options.is_empty(), ERR_BUG);
int import_flags = 0;