From ce60a06cc223cc6669ef4c95387f4589b7526277 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Fri, 12 Apr 2024 21:03:56 +0300 Subject: [PATCH] [MIRROR] [NO GBP] Fixes spurious runtime caused by icemoon (again) (#2842) * [NO GBP] Fixes spurious runtime caused by icemoon (again) (#82582) https://github.com/tgstation/tgstation/pull/82572 I tried to fix this but there was an unaccounted race condition which just caused a separate runtime... ![firefox_GxGibAO281](https://github.com/tgstation/tgstation/assets/13398309/f251aecc-ef17-4bae-a741-5aade40de423) Since the type is being changed mid-execution `replacement_turf` will become out of scope. My bad--this should fix it now for good. * [NO GBP] Fixes spurious runtime caused by icemoon (again) --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Iajret --- code/game/turfs/open/openspace.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/turfs/open/openspace.dm b/code/game/turfs/open/openspace.dm index afdcccf8ee9..2006a3e6829 100644 --- a/code/game/turfs/open/openspace.dm +++ b/code/game/turfs/open/openspace.dm @@ -187,8 +187,8 @@ if(!T) return if(T.turf_flags & NO_RUINS && protect_ruin) - ChangeTurf(replacement_turf, null, CHANGETURF_IGNORE_AIR) - if(!isopenspaceturf(replacement_turf)) // only openspace turfs should be returning INITIALIZE_HINT_LATELOAD + var/turf/newturf = ChangeTurf(replacement_turf, null, CHANGETURF_IGNORE_AIR) + if(!isopenspaceturf(newturf)) // only openspace turfs should be returning INITIALIZE_HINT_LATELOAD return INITIALIZE_HINT_NORMAL return if(!ismineralturf(T) || !drill_below)