Browse Source

Fixed CID 1375685

AlexVinS 8 years ago
parent
commit
1c95c51ffb
1 changed files with 5 additions and 0 deletions
  1. 5 0
      client/windows/CCreatureWindow.cpp

+ 5 - 0
client/windows/CCreatureWindow.cpp

@@ -180,6 +180,11 @@ std::string CStackWindow::generateStackExpDescription()
 void CStackWindow::removeStackArtifact(ArtifactPosition pos)
 {
 	auto art = info->stackNode->getArt(ArtifactPosition::CREATURE_SLOT);
+	if(!art)
+	{
+		logGlobal->error("Attempt to remove missing artifact");
+		return;
+	}
 	LOCPLINT->cb->swapArtifacts(ArtifactLocation(info->stackNode, pos),
 								ArtifactLocation(info->owner, art->firstBackpackSlot(info->owner)));
 	stackArtifactButton.reset();