From 817b8e3efdb4c31db01f0dabf50b8a22053ad262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Wed, 27 Mar 2019 10:11:03 +0100 Subject: [PATCH] [core] don't access empty texture pos optionals when buckets are out of sync --- src/mbgl/renderer/layers/render_line_layer.cpp | 4 ++-- src/mbgl/renderer/paint_property_binder.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mbgl/renderer/layers/render_line_layer.cpp b/src/mbgl/renderer/layers/render_line_layer.cpp index a023bc6254e..04b191d0f6c 100644 --- a/src/mbgl/renderer/layers/render_line_layer.cpp +++ b/src/mbgl/renderer/layers/render_line_layer.cpp @@ -143,8 +143,8 @@ void RenderLineLayer::render(PaintParameters& parameters, RenderSource*) { texsize, crossfade, parameters.pixelRatio), - *posA, - *posB, + posA, + posB, LinePatternProgram::TextureBindings{ textures::image::Value{ *geometryTile.iconAtlasTexture->resource, gfx::TextureFilterType::Linear }, }); diff --git a/src/mbgl/renderer/paint_property_binder.hpp b/src/mbgl/renderer/paint_property_binder.hpp index 60866832c6e..dd56afb2e83 100644 --- a/src/mbgl/renderer/paint_property_binder.hpp +++ b/src/mbgl/renderer/paint_property_binder.hpp @@ -148,7 +148,7 @@ class ConstantCrossFadedPaintPropertyBinder final : public PaintPropertyBinder& posA, const optional& posB, CrossfadeParameters&) override { - if (!posA && !posB) { + if (!posA || !posB) { return; } else { constantPatternPositions = std::tuple, std::array> { posB->tlbr(), posA->tlbr() };