mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +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()
|
/datum/controller/process/mob/doWork()
|
||||||
for(last_object in mob_list)
|
for(last_object in mob_list)
|
||||||
var/mob/M = last_object
|
var/mob/M = last_object
|
||||||
if(isnull(M.gcDestroyed))
|
if(M && isnull(M.gcDestroyed))
|
||||||
try
|
try
|
||||||
M.Life()
|
M.Life()
|
||||||
catch(var/exception/e)
|
catch(var/exception/e)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
/datum/controller/process/obj/doWork()
|
/datum/controller/process/obj/doWork()
|
||||||
for(last_object in processing_objects)
|
for(last_object in processing_objects)
|
||||||
var/datum/O = last_object
|
var/datum/O = last_object
|
||||||
if(isnull(O.gcDestroyed))
|
if(O && isnull(O.gcDestroyed))
|
||||||
try
|
try
|
||||||
O:process()
|
O:process()
|
||||||
catch(var/exception/e)
|
catch(var/exception/e)
|
||||||
|
|||||||
Reference in New Issue
Block a user