mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
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:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user