From 2ba705ffe991a4d002e98c0c083d03f11303515a Mon Sep 17 00:00:00 2001 From: indeano <38874984+indeano@users.noreply.github.com> Date: Mon, 7 May 2018 05:05:27 -0400 Subject: [PATCH] Fixes server crashing when attempting to drop an empty hand's contained entity. (#66) * fixes server crash on empty hand drop Fixes issue with server crashing when client requests for an empty hand to drop its entity. * fixes drop crash by checking for null in container contains * removes old change - time to learn to reset properly --- Content.Server/GameObjects/ContainerSlot.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/ContainerSlot.cs b/Content.Server/GameObjects/ContainerSlot.cs index 060b989437..bcc3f92d26 100644 --- a/Content.Server/GameObjects/ContainerSlot.cs +++ b/Content.Server/GameObjects/ContainerSlot.cs @@ -31,7 +31,7 @@ namespace Content.Server.GameObjects /// public override bool Contains(IEntity contained) { - if (contained == ContainedEntity) + if (contained != null && contained == ContainedEntity) return true; return false; }