2
0
Эх сурвалжийг харах

add null check in MeshInstance::_mesh_changed()

Angad Kambli 4 жил өмнө
parent
commit
6b602d35f3

+ 1 - 0
scene/3d/mesh_instance_3d.cpp

@@ -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());
 }