From 76edd1079f6043b552d9bd5abf1bf4678c35d265 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 14 Mar 2020 00:47:22 +0100 Subject: [PATCH] try fix crash when tot --- ReallifeGamemode.Server/Events/Death.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index 69410223..db385cb1 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -27,7 +27,7 @@ namespace ReallifeGamemode.Server.Events player.SetData("isDead", true); //TODO: Zum Full Release entfernen - ChatService.SendMessage(player, "Du bist durch " + killer.Name + " gestorben: " + reason.ToString()); + ChatService.SendMessage(player, "Du bist durch " + killer?.Name ?? "Niemanden" + " gestorben: " + reason.ToString()); int? killerId; float killerPosX; @@ -35,7 +35,7 @@ namespace ReallifeGamemode.Server.Events float killerPosZ; float killerHeading; - if (killer.IsNull) + if (killer == null || killer.IsNull) { killerId = null; killerPosX = -1;