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-04-23 14:13:01 +0300
committerDaria Volvenkova <d.volvenkova@corp.mail.ru>2019-04-23 14:26:13 +0300
commitbfeb85425bbbc32d653a3b68e49b1c52be588eeb (patch)
tree95f650bac23236d0235d66c528f19a41ae8c2729
parentfdbd2937d469df6f3988e615a49bca5fc5fcdeee (diff)
[drape] Do not generate POI shape with invalid symbol
-rw-r--r--drape/render_state.cpp2
-rw-r--r--drape_frontend/apply_feature_functors.cpp7
2 files changed, 7 insertions, 2 deletions
diff --git a/drape/render_state.cpp b/drape/render_state.cpp
index c02cb814d1..b4c0081627 100644
--- a/drape/render_state.cpp
+++ b/drape/render_state.cpp
@@ -236,6 +236,8 @@ void TextureState::ApplyTextures(ref_ptr<GraphicsContext> context, RenderState c
{
auto const it = bindings.find(texture.first);
CHECK(it != bindings.end(), ("Texture bindings inconsistency."));
+ CHECK(texture.second != nullptr, ("Texture must be set for Vulkan rendering",
+ texture.first, p->GetName()));
ref_ptr<dp::vulkan::VulkanTexture> t = texture.second->GetHardwareTexture();
if (t == nullptr)
diff --git a/drape_frontend/apply_feature_functors.cpp b/drape_frontend/apply_feature_functors.cpp
index b99decfa92..1346d6e386 100644
--- a/drape_frontend/apply_feature_functors.cpp
+++ b/drape_frontend/apply_feature_functors.cpp
@@ -595,11 +595,14 @@ void ApplyPointFeature::Finish(ref_ptr<dp::TextureManager> texMng)
: SpecialDisplacement::None;
params.m_specialPriority = specialModePriority;
- m_insertShape(make_unique_dp<PoiSymbolShape>(m2::PointD(m_centerPoint), params, m_tileKey, 0 /* text index */));
-
dp::TextureManager::SymbolRegion region;
texMng->GetSymbolRegion(params.m_symbolName, region);
symbolSize = region.GetPixelSize();
+
+ if (region.IsValid())
+ m_insertShape(make_unique_dp<PoiSymbolShape>(m2::PointD(m_centerPoint), params, m_tileKey, 0 /* text index */));
+ else
+ LOG(LERROR, ("Style error. Symbol name must be valid for feature", m_id));
}
for (auto textParams : m_textParams)