From 792f937aa5c18db3ee436e325a1af3415e224e6a Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Tue, 21 Dec 2021 17:21:25 +0000 Subject: [PATCH] don't try to access properties of null attributes --- src/ol/webgl/PostProcessingPass.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/webgl/PostProcessingPass.js b/src/ol/webgl/PostProcessingPass.js index 362dd1d1cf..9168ddd2ed 100644 --- a/src/ol/webgl/PostProcessingPass.js +++ b/src/ol/webgl/PostProcessingPass.js @@ -273,7 +273,7 @@ class WebGLPostProcessingPass { const canvasId = getUid(gl.canvas); if (!frameState.renderTargets[canvasId]) { const attributes = gl.getContextAttributes(); - if (attributes.preserveDrawingBuffer) { + if (attributes && attributes.preserveDrawingBuffer) { gl.clearColor(0.0, 0.0, 0.0, 0.0); gl.clear(gl.COLOR_BUFFER_BIT); }