Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2019-10-22 17:18:21 +0300
committergmoryes <gmoryes@gmail.com>2019-10-22 18:06:42 +0300
commit833ef055cd717fa3497df16c32650fb1cfae5cbc (patch)
treec00057e2959a982c33d77c2de014216f048f65e1 /drape_frontend
parenta62a3e1dad91a0a59409d6e2e97fe2f854f63037 (diff)
[drape] Fixed crash in stylist
Diffstat (limited to 'drape_frontend')
-rw-r--r--drape_frontend/stylist.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/drape_frontend/stylist.cpp b/drape_frontend/stylist.cpp
index 3b4eb3f7d6..00d1d2d4a8 100644
--- a/drape_frontend/stylist.cpp
+++ b/drape_frontend/stylist.cpp
@@ -230,11 +230,17 @@ void CaptionDescription::ProcessZoomLevel(int const zoomLevel)
}
if (zoomLevel < 5 && m_mainText.size() > 50)
+ {
m_mainText.clear();
+ m_auxText.clear();
+ }
}
void CaptionDescription::ProcessMainTextType(drule::text_type_t const & mainTextType)
{
+ if (m_houseNumber.empty())
+ return;
+
if (mainTextType == drule::text_type_housenumber)
{
m_mainText.swap(m_houseNumber);
@@ -243,8 +249,7 @@ void CaptionDescription::ProcessMainTextType(drule::text_type_t const & mainText
}
else if (mainTextType == drule::text_type_name)
{
- if (!m_houseNumber.empty() &&
- (m_mainText.empty() || m_houseNumber.find(m_mainText) != std::string::npos))
+ if (m_mainText.empty() || m_houseNumber.find(m_mainText) != std::string::npos)
{
m_houseNumber.swap(m_mainText);
m_isHouseNumberInMainText = true;