diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp index 5dbc96b788e..1e6886c148e 100644 --- a/scene/3d/mesh_instance.cpp +++ b/scene/3d/mesh_instance.cpp @@ -701,6 +701,7 @@ bool MeshInstance::is_software_skinning_transform_normals_enabled() const { } void MeshInstance::_mesh_changed() { + ERR_FAIL_COND(mesh.is_null()); materials.resize(mesh->get_surface_count()); if (software_skinning) {