Merge pull request #46165 from angad-k/fix-mesh-instance-crash

add null check in MeshInstance::_mesh_changed()
This commit is contained in:
Rémi Verschelde 2021-02-18 13:00:17 +01:00 committed by GitHub
commit 3374f84a2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {