Merge pull request #70630 from asmaloney/importer-crash-null-mesh-node
Fix crash in SceneImportSettings::_select when a mesh has a null mesh node
This commit is contained in:
commit
ee7beff3c4
|
@ -703,6 +703,7 @@ void SceneImportSettings::_select(Tree *p_from, String p_type, String p_id) {
|
|||
}
|
||||
|
||||
MeshData &md = mesh_map[p_id];
|
||||
if (md.mesh_node != nullptr) {
|
||||
if (p_from != mesh_tree) {
|
||||
md.mesh_node->uncollapse_tree();
|
||||
md.mesh_node->select(0);
|
||||
|
@ -713,6 +714,7 @@ void SceneImportSettings::_select(Tree *p_from, String p_type, String p_id) {
|
|||
md.scene_node->select(0);
|
||||
scene_tree->ensure_cursor_is_visible();
|
||||
}
|
||||
}
|
||||
|
||||
mesh_preview->set_mesh(md.mesh);
|
||||
mesh_preview->show();
|
||||
|
|
Loading…
Reference in New Issue