[core] don't access empty texture pos optionals when buckets are out of sync
This commit is contained in:
@@ -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 },
|
||||
});
|
||||
|
||||
@@ -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() };
|
||||
|
||||
Reference in New Issue
Block a user