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.
This commit is contained in:
parent
9fa1698c74
commit
68c2a959dd
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue