diff --git a/src/data/program_configuration.js b/src/data/program_configuration.js index 6f1ff830a34..0c3a6ea1659 100644 --- a/src/data/program_configuration.js +++ b/src/data/program_configuration.js @@ -184,7 +184,7 @@ class SourceExpressionBinder implements Binder { } upload(context: Context) { - if (this.paintVertexArray) { + if (this.paintVertexArray && this.paintVertexArray.arrayBuffer) { this.paintVertexBuffer = context.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent); } } @@ -279,7 +279,7 @@ class CompositeExpressionBinder implements Binder { } upload(context: Context) { - if (this.paintVertexArray) { + if (this.paintVertexArray && this.paintVertexArray.arrayBuffer) { this.paintVertexBuffer = context.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent); } } diff --git a/test/integration/render-tests/regressions/mapbox-gl-js#6655/expected.png b/test/integration/render-tests/regressions/mapbox-gl-js#6655/expected.png new file mode 100644 index 00000000000..0f286c436a1 Binary files /dev/null and b/test/integration/render-tests/regressions/mapbox-gl-js#6655/expected.png differ diff --git a/test/integration/render-tests/regressions/mapbox-gl-js#6655/style.json b/test/integration/render-tests/regressions/mapbox-gl-js#6655/style.json new file mode 100644 index 00000000000..31572b22e00 --- /dev/null +++ b/test/integration/render-tests/regressions/mapbox-gl-js#6655/style.json @@ -0,0 +1,59 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 64, + "height": 64, + "operations": [ + [ + "setFeatureState", + { + "source": "geojson", + "id": "1" + }, + { + "hover": true + } + ], + [ + "wait" + ] + ] + } + }, + "zoom": 2, + "sources": { + "geojson": { + "type": "geojson", + "data": { + "type": "Feature", + "id": 1, + "properties": { + "radius": 5 + }, + "geometry": { + "type": "Point", + "coordinates": [0,0] + } + } + } + }, + "layers": [ + { + "id": "circle", + "type": "circle", + "source": "geojson", + "paint": { + "circle-radius": [ "get", "radius" ], + "circle-opacity": 0.5, + "circle-color": "#ff0000", + "circle-stroke-width": [ + "case", + ["boolean", ["feature-state", "hover"], false], + 4, + 1 + ] + } + } + ] +}