DeviceVk::DestroyImpl guard for cases where the Queue wasn't created.
Bug: chromium:1496732
Change-Id: I399ee0eefb6abb332dbaa48ed1b59fea3f09f587
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/158481
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn/native/vulkan/DeviceVk.cpp b/src/dawn/native/vulkan/DeviceVk.cpp
index a96417d..09090b2 100644
--- a/src/dawn/native/vulkan/DeviceVk.cpp
+++ b/src/dawn/native/vulkan/DeviceVk.cpp
@@ -738,7 +738,9 @@
ToBackend(GetPhysicalDevice())->GetVulkanInstance()->StopListeningForDeviceMessages(this);
- GetQueue()->Destroy();
+ if (GetQueue() != nullptr) {
+ GetQueue()->Destroy();
+ }
for (Ref<DescriptorSetAllocator>& allocator :
mDescriptorAllocatorsPendingDeallocation.IterateUpTo(kMaxExecutionSerial)) {