More soundness issues
This commit is contained in:
parent
4eacde53fb
commit
92c97b44e4
|
@ -21,6 +21,7 @@ impl DeferredSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn schedule(&self) {
|
pub fn schedule(&self) {
|
||||||
|
// TODO: This is not sound. Pointer to world won't be valid across frames.
|
||||||
unsafe { &mut *self.world }
|
unsafe { &mut *self.world }
|
||||||
.resource_mut::<DeferredSystemRunQueue>()
|
.resource_mut::<DeferredSystemRunQueue>()
|
||||||
.0
|
.0
|
||||||
|
@ -35,6 +36,7 @@ pub struct OnDropUnregisterDeferredSystem(pub DeferredSystem);
|
||||||
|
|
||||||
impl Drop for OnDropUnregisterDeferredSystem {
|
impl Drop for OnDropUnregisterDeferredSystem {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
|
// TODO: This is not sound. Pointer to world won't be valid across frames.
|
||||||
unsafe { &mut *self.0.world }
|
unsafe { &mut *self.0.world }
|
||||||
.remove_system(self.0.id)
|
.remove_system(self.0.id)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
Loading…
Reference in a new issue