Merge pull request #24629 from hedin-hiervard/master

fixes crash when Body2DSW doesn't have space
This commit is contained in:
Rémi Verschelde 2018-12-28 07:47:35 +01:00 committed by GitHub
commit 04c8a43741
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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