diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 37f1a721aae..2ea34728e9e 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -499,7 +499,7 @@ // hack for alt titles if(istype(loc, /mob)) var/mob/M = loc - if(M.mind.role_alt_title == jobName && M.mind.assigned_role in get_all_jobs()) + if(M.mind && M.mind.role_alt_title == jobName && M.mind.assigned_role in get_all_jobs()) return M.mind.assigned_role if(istype(src, /obj/item/device/pda)) diff --git a/code/modules/mob/living/logout.dm b/code/modules/mob/living/logout.dm index a25a631a937..7c272660503 100644 --- a/code/modules/mob/living/logout.dm +++ b/code/modules/mob/living/logout.dm @@ -1,6 +1,7 @@ /mob/living/Logout() ..() - if(!key && mind) //key and mind have become seperated. - mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body. - if(!immune_to_ssd && sleeping < 2 && mind.active) - sleeping = 2 + if (mind) + if(!key) //key and mind have become seperated. + mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body. + if(!immune_to_ssd && sleeping < 2 && mind.active) + sleeping = 2