mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix crash on right-clicking some visited configurable objects
This commit is contained in:
parent
07472d3b05
commit
7b92e23f3f
@ -301,7 +301,7 @@ std::string CRewardableObject::getDescriptionMessage(PlayerColor player, const C
|
||||
return configuration.description.toString();
|
||||
|
||||
auto rewardIndices = getAvailableRewards(hero, Rewardable::EEventType::EVENT_FIRST_VISIT);
|
||||
if (rewardIndices.empty() && !configuration.info[0].description.empty())
|
||||
if (rewardIndices.empty() || !configuration.info[0].description.empty())
|
||||
return configuration.info[0].description.toString();
|
||||
|
||||
if (!configuration.info[rewardIndices.front()].description.empty())
|
||||
|
Loading…
Reference in New Issue
Block a user