From 63b5d837282d234b5c82406023aeaccd949b408b Mon Sep 17 00:00:00 2001 From: DamianX Date: Sat, 24 Mar 2018 16:54:13 +0100 Subject: [PATCH] Fixed crash when pressing BACK in lobby (#46) * Fixed crash when pressing BACK in lobby * that's true --- Content.Client/UserInterface/HandsGui.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Client/UserInterface/HandsGui.cs b/Content.Client/UserInterface/HandsGui.cs index 6b1728fdd0..8cd539f27b 100644 --- a/Content.Client/UserInterface/HandsGui.cs +++ b/Content.Client/UserInterface/HandsGui.cs @@ -55,13 +55,13 @@ namespace Content.Client.UserInterface protected override void DrawContents() { - if (_playerManager?.LocalPlayer.ControlledEntity == null) + if (_playerManager?.LocalPlayer == null) { return; } IEntity entity = _playerManager.LocalPlayer.ControlledEntity; - if (!entity.TryGetComponent(out var hands)) + if (entity == null || !entity.TryGetComponent(out var hands)) { return; }