diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-13 18:40:35 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-17 10:05:23 -0600 |
| commit | 0fc31728ea1af3275a1424fbc65430ca1d1cc34a (patch) | |
| tree | 5abe666e2e5e2c216552ee86baadbd381037301b | |
| parent | 6839bec847afc9b87060f360ec45cb5806503b62 (diff) | |
| download | usermoji-0fc31728ea1af3275a1424fbc65430ca1d1cc34a.tar.xz | |
mem_tracker: Don't try to copy data if none available
Check that call received data before trying to copy.
| -rw-r--r-- | layers/mem_tracker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layers/mem_tracker.cpp b/layers/mem_tracker.cpp index f2b3c915..1ae5bde6 100644 --- a/layers/mem_tracker.cpp +++ b/layers/mem_tracker.cpp @@ -2923,7 +2923,7 @@ VK_LAYER_EXPORT VkResult VKAPI vkGetSwapChainInfoWSI( { VkResult result = get_dispatch_table(mem_tracker_device_table_map, (void*) swapChain.handle)->GetSwapChainInfoWSI(device, swapChain, infoType, pDataSize, pData); - if (infoType == VK_SWAP_CHAIN_INFO_TYPE_IMAGES_WSI && result == VK_SUCCESS) { + if (infoType == VK_SWAP_CHAIN_INFO_TYPE_IMAGES_WSI && result == VK_SUCCESS && pData != NULL) { const size_t count = *pDataSize / sizeof(VkSwapChainImagePropertiesWSI); MT_SWAP_CHAIN_INFO *pInfo = swapChainMap[swapChain.handle]; |
