summaryrefslogtreecommitdiff
path: root/modules
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 /modules
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 'modules')
-rw-r--r--modules/bullet/soft_body_bullet.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/bullet/soft_body_bullet.cpp b/modules/bullet/soft_body_bullet.cpp
index 81b832fb42..3a2370ff31 100644
--- a/modules/bullet/soft_body_bullet.cpp
+++ b/modules/bullet/soft_body_bullet.cpp
@@ -116,6 +116,7 @@ void SoftBodyBullet::set_soft_mesh(RID p_mesh) {
}
Array arrays = RenderingServer::get_singleton()->mesh_surface_get_arrays(soft_mesh, 0);
+ ERR_FAIL_COND(arrays.is_empty());
bool success = set_trimesh_body_shape(arrays[RS::ARRAY_INDEX], arrays[RS::ARRAY_VERTEX]);
if (!success) {