From 7aa93d91558e6743838c3a3ddb1db4ec744b1a54 Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Mon, 15 May 2017 16:07:08 +0300 Subject: [PATCH] Fixed style switch in stylist --- drape_frontend/stylist.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drape_frontend/stylist.cpp b/drape_frontend/stylist.cpp index c1aa1fe69b..39d45dcc91 100644 --- a/drape_frontend/stylist.cpp +++ b/drape_frontend/stylist.cpp @@ -73,7 +73,8 @@ void FilterRulesByRuntimeSelector(FeatureType const & f, int zoomLevel, drule::K keys.erase_if([&f, zoomLevel](drule::Key const & key)->bool { drule::BaseRule const * const rule = drule::rules().Find(key); - ASSERT(rule != nullptr, ()); + if (rule == nullptr) + return true; return !rule->TestFeature(f, zoomLevel); }); } @@ -143,6 +144,9 @@ private: } drule::BaseRule const * const dRule = drule::rules().Find(key); + if (dRule == nullptr) + return; + m_rules.emplace_back(make_pair(dRule, depth)); if (dRule->GetCaption(0) != nullptr)