mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
crash fixed
This commit is contained in:
parent
ce3e150d59
commit
20d86edbd1
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user