Merge pull request #83764 from timothyqiu/suffix-only
Fix infinite loop when importing 3D object named "-colonly"
This commit is contained in:
commit
4f138db264
1 changed files with 5 additions and 1 deletions
|
@ -669,7 +669,11 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, HashMap<R
|
||||||
fixed_name = _fixstr(name, "convcolonly");
|
fixed_name = _fixstr(name, "convcolonly");
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_FAIL_COND_V(fixed_name.is_empty(), nullptr);
|
if (fixed_name.is_empty()) {
|
||||||
|
p_node->set_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<ImporterMeshInstance3D>(p_node);
|
ImporterMeshInstance3D *mi = Object::cast_to<ImporterMeshInstance3D>(p_node);
|
||||||
if (mi) {
|
if (mi) {
|
||||||
|
|
Loading…
Reference in a new issue