1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

CTradeWindow: avoid crash when right click on artifact

Fix suggested by @argarak in PR #199
This commit is contained in:
Arseniy Shestakov 2016-03-12 03:19:38 +03:00
parent fe4d871fe7
commit faae305ec0

View File

@ -268,8 +268,9 @@ void CTradeWindow::CTradeableItem::clickRight(tribool down, bool previousState)
break;
case ARTIFACT_TYPE:
case ARTIFACT_PLACEHOLDER:
//TODO: it's would be better for market to contain actual CArtifactInstance and not just ids of certain artifact type so we can use getEffectiveDescription.
if(id >= 0)
adventureInt->handleRightClick(hlp->getEffectiveDescription(), down);
adventureInt->handleRightClick(CGI->arth->artifacts[id]->Description(), down);
break;
}
}