From 04bd315bf0b3d3054002b95765249d342fc362c8 Mon Sep 17 00:00:00 2001 From: Bloop <13398309+vinylspiders@users.noreply.github.com> Date: Sun, 31 Aug 2025 00:19:38 -0400 Subject: [PATCH] Guards against runtiming in the middle of the client Destroy() proc (#92686) ## About The Pull Request Tin. Runtiming in this spot is really not good and may have potentially caused a crash for one of our rounds. Not sure how it happened exactly, but it costs nothing to be safe here. image ## Why It's Good For The Game Let clients finish their destruction ## Changelog Not player-facing --- code/modules/client/client_procs.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 849acd5ba6e..f2b213c3b6d 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -596,7 +596,10 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( GLOB.clients -= src GLOB.directory -= ckey - persistent_client.set_client(null) + if(persistent_client) + persistent_client.set_client(null) + else + stack_trace("A client was Del()'d without a persistent_client! This should not be happening.") log_access("Logout: [key_name(src)]") GLOB.ahelp_tickets.ClientLogout(src)