소스 검색

Fix crash on visiting Seer Hut with no reward

Ivan Savenko 1 년 전
부모
커밋
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));