Merge pull request #1609 from TheoXD/_fix_crash_in_viewport_picking
Fixed crash in viewport object picking.
This commit is contained in:
commit
49ca7b5f12
|
@ -406,7 +406,7 @@ void Viewport::_notification(int p_what) {
|
||||||
int rc = ss2d->intersect_point(point,res,64,Set<RID>(),0xFFFFFFFF,0xFFFFFFFF);
|
int rc = ss2d->intersect_point(point,res,64,Set<RID>(),0xFFFFFFFF,0xFFFFFFFF);
|
||||||
for(int i=0;i<rc;i++) {
|
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>();
|
CollisionObject2D *co=res[i].collider->cast_to<CollisionObject2D>();
|
||||||
if (co) {
|
if (co) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue