summaryrefslogtreecommitdiffstats
path: root/dom/webgpu/CanvasContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/webgpu/CanvasContext.cpp')
-rw-r--r--dom/webgpu/CanvasContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/dom/webgpu/CanvasContext.cpp b/dom/webgpu/CanvasContext.cpp
index 46633d9160..62735d1af5 100644
--- a/dom/webgpu/CanvasContext.cpp
+++ b/dom/webgpu/CanvasContext.cpp
@@ -204,6 +204,10 @@ RefPtr<Texture> CanvasContext::GetCurrentTexture(ErrorResult& aRv) {
}
void CanvasContext::MaybeQueueSwapChainPresent() {
+ if (!mConfig) {
+ return;
+ }
+
MOZ_ASSERT(mTexture);
if (mTexture) {