summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2019-04-27 00:27:19 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2019-05-14 10:59:57 +0000
commit6d7c7a5ddafc8005969d4d99dc0c92b49ac4bcb3 (patch)
tree194076ba63be20180ebd11a0308110f91876615f
parent22c3c55de44b9b900b5e4d7040a9c3f906d0bfa1 (diff)
wasm: prevent crash on null backingstore pointer
We can get draw calls in between creating the platform window and the platform backing store. Task-number: QTBUG-75463 Change-Id: If0b67d40fac84e466f204ec23a267aa4c6121cbd Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
-rw-r--r--src/plugins/platforms/wasm/qwasmcompositor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcompositor.cpp b/src/plugins/platforms/wasm/qwasmcompositor.cpp
index e6a69c4814..b3234197d0 100644
--- a/src/plugins/platforms/wasm/qwasmcompositor.cpp
+++ b/src/plugins/platforms/wasm/qwasmcompositor.cpp
@@ -251,6 +251,8 @@ void QWasmCompositor::blit(QOpenGLTextureBlitter *blitter, QWasmScreen *screen,
void QWasmCompositor::drawWindowContent(QOpenGLTextureBlitter *blitter, QWasmScreen *screen, QWasmWindow *window)
{
QWasmBackingStore *backingStore = window->backingStore();
+ if (!backingStore)
+ return;
QOpenGLTexture const *texture = backingStore->getUpdatedTexture();