1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

CArtifactsOfHero: use shared_ptr for SCommonPart

This commit is contained in:
Arseniy Shestakov
2016-08-30 07:05:31 +03:00
parent b8f4fdc2f2
commit 0236309d25
6 changed files with 9 additions and 9 deletions

View File

@@ -169,7 +169,7 @@ bool CGarrisonSlot::highlightOrDropArtifact()
bool artSelected = false;
if (CWindowWithArtifacts* chw = dynamic_cast<CWindowWithArtifacts*>(GH.topInt())) //dirty solution
{
const CArtifactsOfHero::SCommonPart *commonInfo = chw->artSets.front()->commonInfo;
const std::shared_ptr<CArtifactsOfHero::SCommonPart> commonInfo = chw->artSets.front()->commonInfo;
if (const CArtifactInstance *art = commonInfo->src.art)
{
const CGHeroInstance *srcHero = commonInfo->src.AOH->getHero();