diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm index a3a9d96a55..b46919a6c6 100644 --- a/code/datums/components/mood.dm +++ b/code/datums/components/mood.dm @@ -125,6 +125,9 @@ screen_obj.icon_state = "mood[mood_level]" /datum/component/mood/process() //Called on SSmood process + if(QDELETED(parent)) // workaround to an obnoxious sneaky periodical runtime. + qdel(src) + return var/mob/living/owner = parent switch(mood_level) @@ -249,7 +252,7 @@ RegisterSignal(screen_obj, COMSIG_CLICK, .proc/hud_click) /datum/component/mood/proc/unmodify_hud(datum/source) - if(!screen_obj) + if(!screen_obj || !parent) return var/mob/living/owner = parent var/datum/hud/hud = owner.hud_used diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm index dcdbd5ca4b..c05b07a693 100644 --- a/code/datums/components/riding.dm +++ b/code/datums/components/riding.dm @@ -310,10 +310,10 @@ if(!user.put_in_hands(inhand, TRUE)) qdel(inhand) // it isn't going to be added to offhands anyway break - LAZYADD(equipped, src) + LAZYADD(equipped, inhand) var/amount_equipped = LAZYLEN(equipped) if(amount_equipped) - LAZYADD(offhands[L], amount_equipped) + LAZYADD(offhands[L], equipped) if(amount_equipped >= amount_required) return TRUE unequip_buckle_inhands(L)