diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 33c2b0e2389..90b0b07a92c 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -669,7 +669,11 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, HashMapset_owner(nullptr); + memdelete(p_node); + ERR_FAIL_V_MSG(nullptr, vformat("Skipped node `%s` because its name is empty after removing the suffix.", name)); + } ImporterMeshInstance3D *mi = Object::cast_to(p_node); if (mi) {