Merge pull request #24629 from hedin-hiervard/master
fixes crash when Body2DSW doesn't have space
This commit is contained in:
commit
04c8a43741
1 changed files with 1 additions and 0 deletions
|
@ -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()) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue