You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void spatial_partition::check_for_leaving_collisions() should CONTINUE/SKIP TO NEXT if( collisions_found[i].type == collision_event_type::collision_leave )
#154
This function has an if statement to check if the collision event is already in the leave state. The problem is that code can later be executed that references the previously deleted/erased collision event. This will cause segmentation faults and unexpected activity is the ifs below are still checked and/or valid for the next element.
When this if statement is completed, either do an else for the remaining code or do a break in the for loop.
The text was updated successfully, but these errors were encountered:
nhurde
changed the title
void spatial_partition::check_for_leaving_collisions() should break if( collisions_found[i].type == collision_event_type::collision_leave )
void spatial_partition::check_for_leaving_collisions() should CONTINUE/SKIP TO NEXT if( collisions_found[i].type == collision_event_type::collision_leave )
May 17, 2024
This function has an if statement to check if the collision event is already in the leave state. The problem is that code can later be executed that references the previously deleted/erased collision event. This will cause segmentation faults and unexpected activity is the ifs below are still checked and/or valid for the next element.
When this if statement is completed, either do an else for the remaining code or do a break in the for loop.
The text was updated successfully, but these errors were encountered: