diff options
| author | Tony Barbour <tony@LunarG.com> | 2016-09-13 11:45:37 -0600 |
|---|---|---|
| committer | Tony Barbour <tony@LunarG.com> | 2016-09-14 09:19:57 -0600 |
| commit | 1a9e03f0c8f80345b1d5e7b6434e377be59a24c8 (patch) | |
| tree | cfbeb2a4b35978c3863023ac27ec02fa2b8450fa /layers/core_validation.cpp | |
| parent | 07d031e24df3121953aa63a7b4eb011899e16d46 (diff) | |
| download | usermoji-1a9e03f0c8f80345b1d5e7b6434e377be59a24c8.tar.xz | |
layers: Only save p-devices if call was successful
Change-Id: Ife211b1b2dc97c5bab0d6e7b177ead6b1a6105d3
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 3b73f274..0030793d 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -11238,7 +11238,7 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uin my_data->instance_dispatch_table->EnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices); if (NULL == pPhysicalDevices) { my_data->instance_state->physical_devices_count = *pPhysicalDeviceCount; - } else { // Save physical devices + } else if (result == VK_SUCCESS){ // Save physical devices for (uint32_t i = 0; i < *pPhysicalDeviceCount; i++) { layer_data *phy_dev_data = get_my_data_ptr(get_dispatch_key(pPhysicalDevices[i]), layer_data_map); phy_dev_data->physical_device_state = unique_ptr<PHYSICAL_DEVICE_STATE>(new PHYSICAL_DEVICE_STATE()); |
