diff --git a/crates/bevy_ecs/src/storage/resource.rs b/crates/bevy_ecs/src/storage/resource.rs index 82a1a54d48..fec0ca86d6 100644 --- a/crates/bevy_ecs/src/storage/resource.rs +++ b/crates/bevy_ecs/src/storage/resource.rs @@ -25,7 +25,10 @@ pub struct ResourceData { impl Drop for ResourceData { fn drop(&mut self) { - if self.is_present() { + // For Non Send resources we need to validate that correct thread + // is dropping the resource. This validation is not needed in case + // of SEND resources. Or if there is no data. + if !SEND && self.is_present() { // If this thread is already panicking, panicking again will cause // the entire process to abort. In this case we choose to avoid // dropping or checking this altogether and just leak the column.