From 136928ecb854ac73a64b51da7a3de4a3475cab7e Mon Sep 17 00:00:00 2001 From: 20kdc Date: Mon, 24 May 2021 15:39:57 +0100 Subject: [PATCH] Fix exception in IconSmoothSystem where it tries to get a grid that doesn't exist (#4064) This finally ought to actually kill the bug for real this time. Hopefully. --- Content.Client/GameObjects/EntitySystems/IconSmoothSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Client/GameObjects/EntitySystems/IconSmoothSystem.cs b/Content.Client/GameObjects/EntitySystems/IconSmoothSystem.cs index 7a435e9dbf..fbccdb6212 100644 --- a/Content.Client/GameObjects/EntitySystems/IconSmoothSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/IconSmoothSystem.cs @@ -66,10 +66,10 @@ namespace Content.Client.GameObjects.EntitySystems // This is simpler to implement. If you want to optimize it be my guest. var senderEnt = ev.Sender; if (senderEnt.IsValid() && + _mapManager.TryGetGrid(senderEnt.Transform.GridID, out var grid1) && senderEnt.TryGetComponent(out IconSmoothComponent? iconSmooth) && iconSmooth.Running) { - var grid1 = _mapManager.GetGrid(senderEnt.Transform.GridID); var coords = senderEnt.Transform.Coordinates; _dirtyEntities.Enqueue(senderEnt.Uid);