From 0c3ef8137fee4177cdaf6cec8b69cf423439cfbb Mon Sep 17 00:00:00 2001 From: Atermonera Date: Tue, 5 Nov 2019 13:36:49 -0900 Subject: [PATCH] Merge pull request #6512 from Verkister/patch-29 Sanity check for orphaned ai_holder runtimes --- code/modules/ai/ai_holder_disabled.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/ai/ai_holder_disabled.dm b/code/modules/ai/ai_holder_disabled.dm index 8b296b2d10..dc3717fe18 100644 --- a/code/modules/ai/ai_holder_disabled.dm +++ b/code/modules/ai/ai_holder_disabled.dm @@ -5,6 +5,9 @@ // If our holder is able to do anything. /datum/ai_holder/proc/can_act() + if(!holder) // Holder missing. + SSai.processing -= src + return FALSE if(holder.stat) // Dead or unconscious. ai_log("can_act() : Stat was non-zero ([holder.stat]).", AI_LOG_TRACE) return FALSE @@ -95,4 +98,4 @@ holder.IMove(get_step(holder,moving_to)) wander_delay = base_wander_delay ai_log("handle_wander_movement() : Exited.", AI_LOG_DEBUG) -*/ \ No newline at end of file +*/