Skip to content

Commit

Permalink
Merge pull request #1233 from OpenGeoscience/guard-texture-handle
Browse files Browse the repository at this point in the history
fix: Guard texture update calls
  • Loading branch information
manthey authored Jun 29, 2022
2 parents 7f57d37 + 2850db1 commit 52900ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webgl/quadFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52900ff

Please sign in to comment.