From 7c674ede6297fa792d7e773d138787473d016688 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Mon, 31 Jul 2023 12:42:53 +0100 Subject: [PATCH] catch for no cause data --- code/datums/statistics/entities/death_stats.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/datums/statistics/entities/death_stats.dm b/code/datums/statistics/entities/death_stats.dm index 68b5d876360a..5c65c8b390b1 100644 --- a/code/datums/statistics/entities/death_stats.dm +++ b/code/datums/statistics/entities/death_stats.dm @@ -69,7 +69,10 @@ stack_trace("track_mob_death called with string cause ([cause_data]) instead of datum") cause_data = create_cause_data(cause_data) - attack_log += "\[[time_stamp()]\] died to [cause_data.cause_name]" + var/log_message = "\[[time_stamp()]\] [key_name(src)] died" + if(cause_data) + log_message += " to [cause_data.cause_name]" + attack_log += "[log_message]." if(!mind || statistic_exempt) return