From f19665e69804d07a8b7d28ba8c4025abf1893574 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Fri, 20 Oct 2017 01:42:18 -0500 Subject: [PATCH] [MIRROR] Fixes another stack overflow in pull code (#3515) * Merge pull request #31905 from AnturK/anotherloop Fixes another stack overflow in pull code * Fixes another stack overflow in pull code --- code/modules/mob/mob.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 657c4f0ded..1d0cce5a09 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -384,12 +384,14 @@ if(pulling) pulling.pulledby = null - if(isliving(pulling)) - var/mob/living/L = pulling - L.update_canmove()// mob gets up if it was lyng down in a chokehold + var/mob/living/ex_pulled = pulling pulling = null grab_state = 0 update_pull_hud_icon() + + if(isliving(ex_pulled)) + var/mob/living/L = ex_pulled + L.update_canmove()// mob gets up if it was lyng down in a chokehold /mob/proc/update_pull_hud_icon() if(hud_used)