From 78563a608eb5f59e94c948b77e93574267576a62 Mon Sep 17 00:00:00 2001 From: Leshana Date: Fri, 17 Mar 2017 00:33:25 -0400 Subject: [PATCH 1/2] Fix runtime in mob controller loop. * Any nulls present in the mob_list would cause a runtime when checked if they are gcDestroyed. Add a null check. * Noticed that the object controller has the same bug, might as well fix now too. --- code/controllers/Processes/mob.dm | 2 +- code/controllers/Processes/obj.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/controllers/Processes/mob.dm b/code/controllers/Processes/mob.dm index b44842036d..8681803ac4 100644 --- a/code/controllers/Processes/mob.dm +++ b/code/controllers/Processes/mob.dm @@ -14,7 +14,7 @@ /datum/controller/process/mob/doWork() for(last_object in mob_list) var/mob/M = last_object - if(isnull(M.gcDestroyed)) + if(M && isnull(M.gcDestroyed)) try M.Life() catch(var/exception/e) diff --git a/code/controllers/Processes/obj.dm b/code/controllers/Processes/obj.dm index bd50edd111..1010c8cc97 100644 --- a/code/controllers/Processes/obj.dm +++ b/code/controllers/Processes/obj.dm @@ -11,7 +11,7 @@ /datum/controller/process/obj/doWork() for(last_object in processing_objects) var/datum/O = last_object - if(isnull(O.gcDestroyed)) + if(O && isnull(O.gcDestroyed)) try O:process() catch(var/exception/e) From 801dc5e0a6c31677c5deba4866bb0a91c2170b2c Mon Sep 17 00:00:00 2001 From: Leshana Date: Fri, 17 Mar 2017 00:49:19 -0400 Subject: [PATCH 2/2] Fix another runtime when trying to respawn before roundstart. * If you observe, then want to respawn before the round starts, it runtimes. Lets prevent this. --- code/modules/mob/mob.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 7d969569d4..95a96f03c8 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -341,7 +341,7 @@ if ((stat != 2 || !( ticker ))) usr << "You must be dead to use this!" return - if (ticker.mode.deny_respawn) //BS12 EDIT + if (ticker.mode && ticker.mode.deny_respawn) //BS12 EDIT usr << "Respawn is disabled for this roundtype." return else