fixes null parent in destroy for components (#32351)

* fixes parent being null in destroy

* extends qdel
This commit is contained in:
Emmett Gaines
2017-11-07 15:35:09 -05:00
committed by CitadelStationBot
parent 36234e94d4
commit 8fb5936c30
4 changed files with 15 additions and 17 deletions
+2 -2
View File
@@ -263,7 +263,7 @@ SUBSYSTEM_DEF(garbage)
// Should be treated as a replacement for the 'del' keyword.
// Datums passed to this will be given a chance to clean up references to allow the GC to collect them.
/proc/qdel(datum/D, force=FALSE)
/proc/qdel(datum/D, force=FALSE, ...)
if(!istype(D))
del(D)
return
@@ -278,7 +278,7 @@ SUBSYSTEM_DEF(garbage)
D.gc_destroyed = GC_CURRENTLY_BEING_QDELETED
var/start_time = world.time
var/start_tick = world.tick_usage
var/hint = D.Destroy(force) // Let our friend know they're about to get fucked up.
var/hint = D.Destroy(arglist(args.Copy(2))) // Let our friend know they're about to get fucked up.
if(world.time != start_time)
I.slept_destroy++
else