PR fixes.

This commit is contained in:
Lev Dragunov 2015-10-12 13:29:35 +03:00
parent 814f8ba857
commit 7af71e98ef

View file

@ -55,8 +55,7 @@ RoutingMapping::RoutingMapping(string const & countryFile, MwmSet * pIndex)
m_error(IRouter::ResultCode::RouteFileNotExist),
m_pIndex(pIndex)
{
if (m_pIndex == 0)
return;
CHECK(m_pIndex != nullptr, ());
m_handle = pIndex->GetMwmHandleByCountryFile(CountryFile(countryFile));
if (!m_handle.IsAlive())
@ -85,7 +84,8 @@ RoutingMapping::RoutingMapping(string const & countryFile, MwmSet * pIndex)
void RoutingMapping::LoadFileIfNeeded()
{
if (!m_handle.IsAlive() && m_mwmId.IsAlive() && m_pIndex)
ASSERT(m_pIndex != nullptr, ());
if (!m_handle.IsAlive() && m_mwmId.IsAlive())
m_handle = m_pIndex->GetMwmHandleById(m_mwmId);
}