diff options
author | TheoXD <redsymbzone@hotmail.com> | 2015-04-03 14:42:05 +0200 |
---|---|---|
committer | TheoXD <redsymbzone@hotmail.com> | 2015-04-03 14:42:05 +0200 |
commit | 68c2a959dd8516823f9f501bed1ac23197e892d2 (patch) | |
tree | d8eba03043b0f18cef8f6c2447755c24ac2f3019 /scene/main | |
parent | 9fa1698c7420bae2c6353bf300ce2cdb73434bf6 (diff) |
Bullet shower demo crashed because of dynamic casting in the code for object picking. Making sure the object has an ID greater than 0 before typecasting solves it.
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/viewport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index ee400ae6d5..f0c71da153 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -406,7 +406,7 @@ void Viewport::_notification(int p_what) { int rc = ss2d->intersect_point(point,res,64,Set<RID>(),0xFFFFFFFF,0xFFFFFFFF); for(int i=0;i<rc;i++) { - if (res[i].collider) { + if (res[i].collider_id && res[i].collider) { CollisionObject2D *co=res[i].collider->cast_to<CollisionObject2D>(); if (co) { |