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

try_insert Aabbs #10801

Merged
merged 1 commit into from
Nov 29, 2023
Merged

try_insert Aabbs #10801

merged 1 commit into from
Nov 29, 2023

Conversation

robtfm
Copy link
Contributor

@robtfm robtfm commented Nov 29, 2023

Objective

avoid panics from calculate_bounds systems if entities are despawned in PostUpdate.

there's a running general discussion (#10166) about command panicking. in the meantime we may as well fix up some cases where it's clear a failure to insert is safe.

Solution

change .insert(aabb) to .try_insert(aabb)

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen labels Nov 29, 2023
@JMS55 JMS55 added this to the 0.12.1 milestone Nov 29, 2023
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Nov 29, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 29, 2023
Merged via the queue into bevyengine:main with commit 47447be Nov 29, 2023
26 checks passed
cart pushed a commit that referenced this pull request Nov 30, 2023
# Objective

avoid panics from `calculate_bounds` systems if entities are despawned
in PostUpdate.

there's a running general discussion (#10166) about command panicking.
in the meantime we may as well fix up some cases where it's clear a
failure to insert is safe.

## Solution

change `.insert(aabb)` to `.try_insert(aabb)`
james7132 pushed a commit to james7132/bevy that referenced this pull request Dec 1, 2023
# Objective

avoid panics from `calculate_bounds` systems if entities are despawned
in PostUpdate.

there's a running general discussion (bevyengine#10166) about command panicking.
in the meantime we may as well fix up some cases where it's clear a
failure to insert is safe.

## Solution

change `.insert(aabb)` to `.try_insert(aabb)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants