From 707400d764ebc2a7bd616871919d6ece2a7a76c2 Mon Sep 17 00:00:00 2001 From: Gwart Date: Sat, 2 Sep 2023 16:21:54 +0200 Subject: [PATCH] #2646 add a null check if creature is empty --- client/windows/GUIClasses.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/windows/GUIClasses.cpp b/client/windows/GUIClasses.cpp index e921cdf88..bba9a5d5d 100644 --- a/client/windows/GUIClasses.cpp +++ b/client/windows/GUIClasses.cpp @@ -749,6 +749,9 @@ void CExchangeController::moveStack( SlotID sourceSlot) { auto creature = source->getCreature(sourceSlot); + if(creature == nullptr) + return; + SlotID targetSlot = target->getSlotFor(creature); if(targetSlot.validSlot())