1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

crash fixed

This commit is contained in:
SoundSSGood 2023-06-24 17:50:58 +03:00
parent ce3e150d59
commit 20d86edbd1
2 changed files with 2 additions and 3 deletions

View File

@ -1110,7 +1110,7 @@ void CArtifactSet::putArtifact(ArtifactPosition slot, CArtifactInstance * art)
part.slot = ArtifactUtils::getArtAnyPosition(this, part.art->getTypeId());
assert(ArtifactUtils::isSlotEquipment(part.slot));
setNewArtSlot(part.slot, art, true);
setNewArtSlot(part.slot, part.art, true);
}
}
}

View File

@ -882,9 +882,8 @@ void CStackInstance::removeArtifact(ArtifactPosition pos)
{
assert(getArt(pos));
detachFrom(*getArt(pos));
CArtifactSet::removeArtifact(pos);
if(ArtifactUtils::isSlotEquipment(pos))
detachFrom(*getArt(pos));
}
void CStackInstance::serializeJson(JsonSerializeFormat & handler)