Merge pull request #46166 from angad-k/fix-mesh-instance3d-crash
add null check in MeshInstance::_mesh_changed()
This commit is contained in:
commit
ef63b29da7
1 changed files with 1 additions and 0 deletions
|
@ -319,6 +319,7 @@ Ref<Material> MeshInstance3D::get_active_material(int p_surface) const {
|
|||
}
|
||||
|
||||
void MeshInstance3D::_mesh_changed() {
|
||||
ERR_FAIL_COND(mesh.is_null());
|
||||
materials.resize(mesh->get_surface_count());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue