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.
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.