Przeglądaj źródła

#2646 add a null check if creature is empty

Gwart 2 lat temu
rodzic
commit
05ba56a873
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      client/windows/GUIClasses.cpp

+ 3 - 0
client/windows/GUIClasses.cpp

@@ -748,6 +748,9 @@ void CExchangeController::moveStack(
 	SlotID sourceSlot)
 {
 	auto creature = source->getCreature(sourceSlot);
+	if(creature == nullptr)
+		return;
+
 	SlotID targetSlot = target->getSlotFor(creature);
 
 	if(targetSlot.validSlot())