DeviceBase::Destroy only AssumeCommandsCompleted if we have a queue.
The queue could not be set if the device creation failed during
its initialization.
Bug: chromium:1474147
Bug: chromium:1475434
Bug: chromium:1480229
Change-Id: I3b2f7e1886abf12846cf1ef2006c4a9c29bf4e48
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/151460
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
diff --git a/src/dawn/native/Device.cpp b/src/dawn/native/Device.cpp
index 5d3f538..99db74d 100644
--- a/src/dawn/native/Device.cpp
+++ b/src/dawn/native/Device.cpp
@@ -511,7 +511,9 @@
mInternalPipelineStore = nullptr;
mExternalTexturePlaceholderView = nullptr;
- mQueue->AssumeCommandsComplete();
+ if (mQueue != nullptr) {
+ mQueue->AssumeCommandsComplete();
+ }
// Now that the GPU timeline is empty, destroy the backend device.
DestroyImpl();