[search] Fixed crash on old maps.

This commit is contained in:
Yuri Gorshenin 2016-06-24 11:05:02 +03:00
parent 34ad58798e
commit 3e6716c09d

View file

@ -1473,7 +1473,7 @@ void Geocoder::FillMissingFieldsInResults()
{
MwmSet::MwmId mwmId;
MwmSet::MwmHandle mwmHandle;
unique_ptr<RankTable> rankTable;
unique_ptr<RankTable> rankTable = make_unique<DummyRankTable>();
m_preRanker->ForEachInfo([&](FeatureID const & id, PreRankingInfo & info)
{
@ -1486,10 +1486,8 @@ void Geocoder::FillMissingFieldsInResults()
rankTable =
RankTable::Load(mwmHandle.GetValue<MwmValue>()->m_cont);
}
else
{
if (!rankTable)
rankTable = make_unique<DummyRankTable>();
}
}
info.m_rank = rankTable->Get(id.m_index);