diff options
Diffstat (limited to 'indexer/mwm_set.cpp')
-rw-r--r-- | indexer/mwm_set.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/indexer/mwm_set.cpp b/indexer/mwm_set.cpp index 71d8bcef0e..1079ba19ff 100644 --- a/indexer/mwm_set.cpp +++ b/indexer/mwm_set.cpp @@ -4,6 +4,7 @@ #include "defines.hpp" #include "base/assert.hpp" +#include "base/exception.hpp" #include "base/logging.hpp" #include "base/stl_add.hpp" @@ -214,7 +215,18 @@ unique_ptr<MwmSet::MwmValueBase> MwmSet::LockValueImpl(MwmId const & id) } } - return CreateValue(*info); + try + { + return CreateValue(*info); + } + catch (exception const & ex) + { + LOG(LERROR, ("Can't create MWMValue for", info->GetCountryName(), "Reason", ex.what())); + + --info->m_numRefs; + DeregisterImpl(id); + return nullptr; + } } void MwmSet::UnlockValue(MwmId const & id, unique_ptr<MwmValueBase> && p) |