From 7f422500dd787b2deef9fe249db2a302de050c3d Mon Sep 17 00:00:00 2001 From: Katherine Kiefer Date: Sun, 7 Apr 2024 18:44:54 +1000 Subject: [PATCH] actually fix it --- src/turfs/processing.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/turfs/processing.rs b/src/turfs/processing.rs index 6adf3b89..921e074e 100644 --- a/src/turfs/processing.rs +++ b/src/turfs/processing.rs @@ -396,13 +396,11 @@ fn post_process() { if should_react { drop(sender.try_send(Box::new(move || { let turf = ByondValue::new_ref(ValueType::Turf, id); - react_hook( - turf.read_var_id(byond_string!("air")).wrap_err_with(|| { - format!("Tried to call react on turf {turf:?} with invalid air!") - })?, - turf, - ) - .wrap_err("Reacting")?; + //turf is no longer valid for reactions + let Ok(air) = turf.read_var_id(byond_string!("air")) else { + return Ok(()); + }; + react_hook(air, turf).wrap_err("Reacting")?; Ok(()) }))); }