From 013fc360d775e9d2727f9a8a4a9093ff2da8eaf5 Mon Sep 17 00:00:00 2001 From: Angad Kambli Date: Thu, 18 Feb 2021 16:36:27 +0530 Subject: [PATCH] add null check in MeshInstance::_mesh_changed() --- scene/3d/mesh_instance.cpp | 1 + 1 file changed, 1 insertion(+) 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) {