diff options
| author | 2018-02-02 12:49:28 -0800 | |
|---|---|---|
| committer | 2018-02-06 03:11:46 +0000 | |
| commit | eb7bdbcb5d15b19a38dc726968f4e4b59b8080e1 (patch) | |
| tree | da964378872759a534a49d1247a69d2e6cd63cb8 /vulkan/libvulkan/driver.cpp | |
| parent | 64afc024d760e31f3f41e0c5cb8fc543c9392ef1 (diff) | |
vkGetDeviceQueue2: add a NULL check
The current driver::GetDeviceQueue2() will indeed crash if the
driver returns a NULL queue, which it is supposed to do if the
pQueueInfo->flags doesn't match the flags requested for the queue
family. Thus need to add a NULL check for pQueue here in case.
Test: deqp vulkancts test
Bug: b/72867433
Change-Id: I306c1a1db52a9986801357eaeb357536ecb0428e
Diffstat (limited to 'vulkan/libvulkan/driver.cpp')
| -rw-r--r-- | vulkan/libvulkan/driver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp index c8e7bd9734..1fceb4ac5e 100644 --- a/vulkan/libvulkan/driver.cpp +++ b/vulkan/libvulkan/driver.cpp @@ -1170,7 +1170,8 @@ void GetDeviceQueue2(VkDevice device, const auto& data = GetData(device); data.driver.GetDeviceQueue2(device, pQueueInfo, pQueue); - SetData(*pQueue, data); + if (pQueue != VK_NULL_HANDLE) + SetData(*pQueue, data); } VKAPI_ATTR VkResult |