mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
Merge pull request #5678 from kdmcser/crash_fix2
fix crash when opening available artifacts popup for a slot
This commit is contained in:
@@ -207,6 +207,8 @@ bool CArtifact::canBePutAt(const CArtifactSet * artSet, ArtifactPosition slot, b
|
||||
auto possibleSlot = ArtifactUtils::getArtAnyPosition(&fittingSet, art->getId());
|
||||
if(ArtifactUtils::isSlotEquipment(possibleSlot))
|
||||
{
|
||||
if (fittingSet.getSlot(possibleSlot) == nullptr)
|
||||
fittingSet.artifactsWorn.insert(std::make_pair(possibleSlot, ArtSlotInfo(fittingSet.cb)));
|
||||
fittingSet.lockSlot(possibleSlot);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user