summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-28 07:47:35 +0100
committerGitHub <noreply@github.com>2018-12-28 07:47:35 +0100
commit04c8a43741656814c86923c89f2dd23646751b96 (patch)
tree2070e7eaff3b7d2e4e6eeae9186581a4ce18dc5c /servers
parenta366d458565f36856ec29b1f555edb8ecd7e16df (diff)
parent1dfdd6834eb5fe515e4edb86cccad19849345f4a (diff)
Merge pull request #24629 from hedin-hiervard/master
fixes crash when Body2DSW doesn't have space
Diffstat (limited to 'servers')
-rw-r--r--servers/physics_2d/physics_2d_server_sw.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp
index 45310ec4b3..0eb22c2520 100644
--- a/servers/physics_2d/physics_2d_server_sw.cpp
+++ b/servers/physics_2d/physics_2d_server_sw.cpp
@@ -1079,6 +1079,7 @@ Physics2DDirectBodyState *Physics2DServerSW::body_get_direct_state(RID p_body) {
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND_V(!body, NULL);
+ ERR_FAIL_COND_V(!body->get_space(), NULL);
if (body->get_space()->is_locked()) {