Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

void spatial_partition::check_for_leaving_collisions() should CONTINUE/SKIP TO NEXT if( collisions_found[i].type == collision_event_type::collision_leave ) #154

Closed
nhurde opened this issue May 16, 2024 · 1 comment
Assignees
Milestone

Comments

@nhurde
Copy link
Contributor

nhurde commented May 16, 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.

@nhurde nhurde added this to the Spring 2024 milestone May 16, 2024
@nhurde nhurde self-assigned this May 16, 2024
@nhurde 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
@nhurde
Copy link
Contributor Author

nhurde commented May 17, 2024

Merged via #158

@nhurde nhurde closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant