mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Makes Initialize check QDELETED before calling (#24818)
* Makes Initialize check QDELETED before calling * uhh * Warnings
This commit is contained in:
@@ -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
|
||||
CHECK_TICK
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user