Skip to content

Commit

Permalink
Sanity
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Jul 18, 2017
1 parent 2a7f8f4 commit f838225
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/datums/components/component.dm
Expand Up @@ -22,10 +22,12 @@
parent = P

/datum/component/Destroy()
enabled = FALSE
var/datum/P = parent
if(P)
_RemoveNoSignal()
P.SendSignal(COMSIG_COMPONENT_REMOVING, src)
LAZYCLEARLIST(signal_procs)
return ..()

/datum/component/proc/_RemoveNoSignal()
Expand All @@ -35,6 +37,8 @@
parent = null

/datum/component/proc/RegisterSignal(sig_type, proc_on_self, override = FALSE)
if(QDELETED(src))
return
var/list/procs = signal_procs
if(!procs)
procs = list()
Expand Down

0 comments on commit f838225

Please sign in to comment.