diff options
author | hedin <flame.beholder@gmail.com> | 2018-12-27 19:29:47 +0200 |
---|---|---|
committer | hedin <flame.beholder@gmail.com> | 2018-12-27 19:29:47 +0200 |
commit | 1dfdd6834eb5fe515e4edb86cccad19849345f4a (patch) | |
tree | 5b9bb68708fe59011e2023152d847dd13fa5d782 | |
parent | 9c135ad2632b4cc754e0233c03b7a69dcfafe377 (diff) |
fixes crash when Body2DSW doesn't have space
-rw-r--r-- | servers/physics_2d/physics_2d_server_sw.cpp | 1 |
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()) { |