aboutsummaryrefslogtreecommitdiff
path: root/layers/swapchain.cpp
diff options
context:
space:
mode:
authorIan Elliott <ianelliott@google.com>2016-02-04 06:11:17 -0700
committerIan Elliott <ianelliott@google.com>2016-02-04 09:31:54 -0700
commitc92583f7d2e3edb67567956e6e11f832484a394b (patch)
tree90ff16f01fc6b3d6a69a2ebef623d63d5ebbb676 /layers/swapchain.cpp
parent96591cd784afc7b62d146572db2882329ad2ab04 (diff)
downloadusermoji-c92583f7d2e3edb67567956e6e11f832484a394b.tar.xz
layers: MR209 Fix swapchain's vkDestroyInstance to error about devices ...
not being previously destroyed, instead of physical devices not being previously destroyed.
Diffstat (limited to 'layers/swapchain.cpp')
-rw-r--r--layers/swapchain.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp
index e9472e29..69e3d966 100644
--- a/layers/swapchain.cpp
+++ b/layers/swapchain.cpp
@@ -357,11 +357,13 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(VkInstance instance
// Free memory that was allocated for/by this SwpPhysicalDevice:
SwpPhysicalDevice *pPhysicalDevice = it->second;
if (pPhysicalDevice) {
- LOG_ERROR(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, instance, "VkInstance",
- SWAPCHAIN_DEL_OBJECT_BEFORE_CHILDREN,
- "%s() called before all of its associated "
- "VkPhysicalDevices were destroyed.",
- __FUNCTION__);
+ if (pPhysicalDevice->pDevice) {
+ LOG_ERROR(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, instance, "VkInstance",
+ SWAPCHAIN_DEL_OBJECT_BEFORE_CHILDREN,
+ "%s() called before all of its associated "
+ "VkDevices were destroyed.",
+ __FUNCTION__);
+ }
free(pPhysicalDevice->pSurfaceFormats);
free(pPhysicalDevice->pPresentModes);
}