summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-03-27 10:11:03 +0100
committerKonstantin Käfer <mail@kkaefer.com>2019-03-27 11:21:19 +0100
commit7f28afc50786f71566afa57786829a27d7ef3b3d (patch)
tree1d57486efe178d70d726ad41da97bd510e97adfd /src
parentd97ff6ae0570212f2e54ef560e1017482837192b (diff)
downloadqtlocation-mapboxgl-7f28afc50786f71566afa57786829a27d7ef3b3d.tar.gz
[core] don't access empty texture pos optionals when buckets are out of sync
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/renderer/layers/render_line_layer.cpp4
-rw-r--r--src/mbgl/renderer/paint_property_binder.hpp2
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 a023bc6254..04b191d0f6 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 60866832c6..dd56afb2e8 100644
--- a/src/mbgl/renderer/paint_property_binder.hpp
+++ b/src/mbgl/renderer/paint_property_binder.hpp
@@ -148,7 +148,7 @@ public:
void upload(gfx::Context&) override {}
void setPatternParameters(const optional<ImagePosition>& posA, const optional<ImagePosition>& posB, CrossfadeParameters&) override {
- if (!posA && !posB) {
+ if (!posA || !posB) {
return;
} else {
constantPatternPositions = std::tuple<std::array<uint16_t, 4>, std::array<uint16_t, 4>> { posB->tlbr(), posA->tlbr() };