layers: Gitlab 126, Fix for swapchain layer which was checking wrong pointer
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp
index b2a8ec7..f84f48f 100644
--- a/layers/swapchain.cpp
+++ b/layers/swapchain.cpp
@@ -1149,7 +1149,7 @@
                 pPhysicalDevice->presentModeCount = *pPresentModeCount;
                 pPhysicalDevice->pPresentModes = (VkPresentModeKHR *)
                     malloc(*pPresentModeCount * sizeof(VkPresentModeKHR));
-                if (pPhysicalDevice->pSurfaceFormats) {
+                if (pPhysicalDevice->pPresentModes) {
                     for (uint32_t i = 0 ; i < *pPresentModeCount ; i++) {
                         pPhysicalDevice->pPresentModes[i] = pPresentModes[i];
                     }