ソースを参照

Fix crash on visiting Seer Hut with no reward

Ivan Savenko 2 年 前
コミット
7187ba2d79
1 ファイル変更1 行追加1 行削除
  1. 1 1
      lib/mapObjects/CRewardableObject.cpp

+ 1 - 1
lib/mapObjects/CRewardableObject.cpp

@@ -59,7 +59,7 @@ std::vector<Component> CRewardableObject::loadComponents(const CGHeroInstance *
 	if (rewardIndices.empty())
 		return result;
 
-	if (configuration.selectMode != Rewardable::SELECT_FIRST)
+	if (configuration.selectMode != Rewardable::SELECT_FIRST && rewardIndices.size() > 1)
 	{
 		for (auto index : rewardIndices)
 			result.push_back(configuration.info.at(index).reward.getDisplayedComponent(contextHero));