From 92c97b44e4b5de87cb353cbaed70d204074705a9 Mon Sep 17 00:00:00 2001 From: JMS55 <47158642+JMS55@users.noreply.github.com> Date: Thu, 7 Dec 2023 11:45:31 -0800 Subject: [PATCH] More soundness issues --- src/deferred_system.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/deferred_system.rs b/src/deferred_system.rs index 85da115..bb734e5 100644 --- a/src/deferred_system.rs +++ b/src/deferred_system.rs @@ -21,6 +21,7 @@ impl DeferredSystem { } pub fn schedule(&self) { + // TODO: This is not sound. Pointer to world won't be valid across frames. unsafe { &mut *self.world } .resource_mut::() .0 @@ -35,6 +36,7 @@ pub struct OnDropUnregisterDeferredSystem(pub DeferredSystem); impl Drop for OnDropUnregisterDeferredSystem { fn drop(&mut self) { + // TODO: This is not sound. Pointer to world won't be valid across frames. unsafe { &mut *self.0.world } .remove_system(self.0.id) .unwrap();