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.
This commit is contained in:
Leshana
2017-03-17 00:33:25 -04:00
parent accf43e644
commit 78563a608e
2 changed files with 2 additions and 2 deletions

View File

@@ -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)

View File

@@ -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)