diff --git a/code/controllers/subsystem/atoms.dm b/code/controllers/subsystem/atoms.dm index abe4451bad3..7fe32d7fe88 100644 --- a/code/controllers/subsystem/atoms.dm +++ b/code/controllers/subsystem/atoms.dm @@ -34,6 +34,9 @@ var/datum/controller/subsystem/atoms/SSatoms for(var/I in atoms) var/atom/A = I if(!A.initialized) //this check is to make sure we don't call it twice on an object that was created in a previous Initialize call + if(QDELETED(A)) + stack_trace("Found new qdeletion in type [A.type]!") + continue var/start_tick = world.time if(A.Initialize(TRUE)) LAZYADD(late_loaders, A) @@ -47,6 +50,9 @@ var/datum/controller/subsystem/atoms/SSatoms #endif for(var/atom/A in world) if(!A.initialized) //this check is to make sure we don't call it twice on an object that was created in a previous Initialize call + if(QDELETED(A)) + stack_trace("Found new qdeletion in type [A.type]!") + continue var/start_tick = world.time if(A.Initialize(TRUE)) LAZYADD(late_loaders, A) @@ -101,4 +107,4 @@ var/datum/controller/subsystem/atoms/SSatoms bad_mutations |= B else if(B.quality == MINOR_NEGATIVE) not_good_mutations |= B - CHECK_TICK \ No newline at end of file + CHECK_TICK diff --git a/code/game/atoms.dm b/code/game/atoms.dm index a09dfd986e6..849e44cbc0a 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -37,6 +37,8 @@ var/do_initialize = SSatoms.initialized if(do_initialize > INITIALIZATION_INSSATOMS) + if(QDELETED(src)) + CRASH("Found new qdeletion in type [type]!") args[1] = do_initialize == INITIALIZATION_INNEW_MAPLOAD Initialize(arglist(args))