summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-10-21 19:33:01 +0200
committerGitHub <noreply@github.com>2021-10-21 19:33:01 +0200
commit836f86688fc5e94b0e7028c0641f088a68d98386 (patch)
treed16513379662a3c525c0d71010f358d1d67fdb29 /servers
parent0264efe895c1e708e661dfe7a7959114b34e32cb (diff)
parente6f7235ffb49e94a876756a9295b907ce7fc834a (diff)
Merge pull request #54053 from nekomatata/fix-soft-body-disable-mode
Fix SoftDynamicBody3D crash when setting disable mode
Diffstat (limited to 'servers')
-rw-r--r--servers/physics_3d/godot_soft_body_3d.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/physics_3d/godot_soft_body_3d.cpp b/servers/physics_3d/godot_soft_body_3d.cpp
index d15235d27c..f214e3603a 100644
--- a/servers/physics_3d/godot_soft_body_3d.cpp
+++ b/servers/physics_3d/godot_soft_body_3d.cpp
@@ -139,6 +139,7 @@ void GodotSoftBody3D::set_mesh(RID p_mesh) {
}
Array arrays = RenderingServer::get_singleton()->mesh_surface_get_arrays(soft_mesh, 0);
+ ERR_FAIL_COND(arrays.is_empty());
bool success = create_from_trimesh(arrays[RenderingServer::ARRAY_INDEX], arrays[RenderingServer::ARRAY_VERTEX]);
if (!success) {