fixes crash when Body2DSW doesn't have space

This commit is contained in:
hedin 2018-12-27 19:29:47 +02:00
parent 9c135ad263
commit 1dfdd6834e

View file

@ -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()) {