diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f82c96528b4a..e98d9eabaa087 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,11 +13,14 @@ - This allows drop-in use of colors from most applications. - New methods `Color::rgb_linear` and `Color::rgba_linear` will accept colors already in linear sRGB (the old behavior) - Individual color-components must now be accessed through setters and getters: `.r`, `.g`, `.b`, `.a`, `.set_r`, `.set_g`, `.set_b`, `.set_a`, and the corresponding methods with the `*_linear` suffix. -- Despawning an entity multiple times causes a debug-level log message to be emitted instead of a panic [649] +- Despawning an entity multiple times causes a debug-level log message to be emitted instead of a panic [649] [651] + [552]: https://github.com/bevyengine/bevy/pull/552 [616]: https://github.com/bevyengine/bevy/pull/616 [649]: https://github.com/bevyengine/bevy/pull/649 +[651]: https://github.com/bevyengine/bevy/pull/651 + ## Version 0.2.1 (2020-9-20) diff --git a/crates/bevy_transform/src/hierarchy/hierarchy.rs b/crates/bevy_transform/src/hierarchy/hierarchy.rs index f123474c599bd..089b9fe9e6e5b 100644 --- a/crates/bevy_transform/src/hierarchy/hierarchy.rs +++ b/crates/bevy_transform/src/hierarchy/hierarchy.rs @@ -67,7 +67,9 @@ fn despawn_with_children_recursive_inner(world: &mut World, entity: Entity) { } } - world.despawn(entity).unwrap(); + if let Err(e) = world.despawn(entity) { + log::debug!("Failed to despawn entity {:?}: {}", entity, e); + } } impl WorldWriter for DespawnRecursive { @@ -128,6 +130,7 @@ mod tests { let parent_entity = world.get::(grandparent_entity).unwrap()[0]; command_buffer.despawn_recursive(parent_entity); + command_buffer.despawn_recursive(parent_entity); // despawning the same entity twice should not panic command_buffer.apply(&mut world, &mut resources); let results = world