From f5b9f733d50c0427e8da98b9beea3cf318ee41cc Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Wed, 7 Feb 2018 14:06:09 -0800 Subject: vkGetDeviceQueue2: fix the NULL check Contents of VkQueue* needs to be checked against VK_NULL_HANDLE Test: dEQP-VK.api.device_init.create_device_queue2* Bug: b/72867433 Change-Id: I39643a75497ef4e59823c6bb90760d34b81f5865 --- vulkan/libvulkan/driver.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'vulkan/libvulkan/driver.cpp') diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp index 1fceb4ac5e..a9d473dcb1 100644 --- a/vulkan/libvulkan/driver.cpp +++ b/vulkan/libvulkan/driver.cpp @@ -1170,8 +1170,7 @@ void GetDeviceQueue2(VkDevice device, const auto& data = GetData(device); data.driver.GetDeviceQueue2(device, pQueueInfo, pQueue); - if (pQueue != VK_NULL_HANDLE) - SetData(*pQueue, data); + if (*pQueue != VK_NULL_HANDLE) SetData(*pQueue, data); } VKAPI_ATTR VkResult -- cgit v1.2.3-59-g8ed1b