Browse Source

avoid crashing when scene import settings are empty

rune-scape 1 year ago
parent
commit
b303e73877
1 changed files with 2 additions and 0 deletions
  1. 2 0
      editor/import/3d/resource_importer_scene.cpp

+ 2 - 0
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;