浏览代码

#2646 add a null check if creature is empty

Gwart 2 年之前
父节点
当前提交
05ba56a873
共有 1 个文件被更改,包括 3 次插入0 次删除
  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())