Fix null stat_panel read in subsystem fire

This commit is contained in:
VMSolidus
2026-08-12 03:24:36 +00:00
parent 5d11add961
commit f02676541f
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -59,7 +59,7 @@ SUBSYSTEM_DEF(statpanels)
var/client/target = currentrun[length(currentrun)]
currentrun.len--
if(!target.stat_panel.is_ready())
if(!target.stat_panel || !target.stat_panel.is_ready())
continue
if(target.stat_tab == "Status" && num_fires % status_wait == 0)
@@ -217,6 +217,8 @@ SUBSYSTEM_DEF(statpanels)
refresh_client_obj_view(target)
/datum/controller/subsystem/statpanels/proc/refresh_client_obj_view(client/refresh)
if(!refresh.stat_panel)
return
var/list/turf_items = return_object_images(refresh)
if(!length(turf_items) || !refresh.mob?.listed_turf)
return
+1 -1
View File
@@ -364,7 +364,6 @@ GLOBAL_LIST_INIT(localhost_addresses, list(
dir = NORTH
GLOB.clients += src
GLOB.directory[ckey] = src
connection_time = world.time
connection_realtime = world.realtime
@@ -382,6 +381,7 @@ GLOBAL_LIST_INIT(localhost_addresses, list(
// Instantiate stat panel
stat_panel = new(src, "statbrowser")
stat_panel.subscribe(src, PROC_REF(on_stat_panel_message))
GLOB.clients += src
// Instantiate tgui panel
tgui_panel = new(src, "browseroutput")
tgui_say = new(src, "tgui_say")