diff --git a/code/datums/components/anti_magic.dm b/code/datums/components/anti_magic.dm index 908aef45115..f4d6fa98b0e 100644 --- a/code/datums/components/anti_magic.dm +++ b/code/datums/components/anti_magic.dm @@ -33,12 +33,14 @@ UnregisterSignal(user, COMSIG_MOB_RECEIVE_MAGIC) /datum/component/anti_magic/proc/protect(datum/source, mob/user, _magic, _holy, major, self, list/protection_sources) - if(((_magic && magic) || (_holy && holy)) && (self && blocks_self)) + if(((_magic && magic) || (_holy && holy)) && (!self || !blocks_self)) protection_sources += parent - reaction.Invoke(user, major) + if(reaction) + reaction.Invoke(user, major) if(major) charges-- if(charges <= 0) - expire.Invoke(user) + if(expire) + expire.Invoke(user) return COMPONENT_BLOCK_MAGIC