mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-24 06:24:19 +00:00
Merge pull request #46166 from angad-k/fix-mesh-instance3d-crash
add null check in MeshInstance::_mesh_changed()
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user