From 2850db1d613f37e923b90ef2e0217c5d68c222ac Mon Sep 17 00:00:00 2001 From: David Manthey Date: Wed, 29 Jun 2022 12:15:02 -0400 Subject: [PATCH] fix: Guard texture update calls. Ensure a valid texture handle. --- src/webgl/quadFeature.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webgl/quadFeature.js b/src/webgl/quadFeature.js index b946289aed..8217ab1998 100644 --- a/src/webgl/quadFeature.js +++ b/src/webgl/quadFeature.js @@ -372,7 +372,7 @@ var webgl_quadFeature = function (arg) { nearestPixel = curZoom >= nearestPixel; } m_quads.imgQuads.forEach((quad) => { - if (quad.image && quad.texture && quad.texture.nearestPixel() !== nearestPixel) { + if (quad.image && quad.texture && quad.texture.nearestPixel() !== nearestPixel && quad.texture.textureHandle()) { /* This could just be * quad.texture.setNearestPixel(nearestPixel); * but that needlessly redecodes the image. Instead, just change the