From 8ce76667f3ad2a25adc25c3d767f347cc6f8f6dd Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Wed, 5 Oct 2016 21:50:14 -0600 Subject: layers: Fix buffer_view destroy ordering Don't destroy buffer_view from map until after invalidating bound cmd buffers. --- layers/core_validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 86f1a8aa..7e822108 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -5804,9 +5804,9 @@ static bool PreCallValidateDestroyBufferView(layer_data *dev_data, VkBufferView static void PostCallRecordDestroyBufferView(layer_data *dev_data, VkBufferView buffer_view, BUFFER_VIEW_STATE *buffer_view_state, VK_OBJECT obj_struct) { - dev_data->bufferViewMap.erase(buffer_view); // Any bound cmd buffers are now invalid invalidateCommandBuffers(buffer_view_state->cb_bindings, obj_struct); + dev_data->bufferViewMap.erase(buffer_view); } VKAPI_ATTR void VKAPI_CALL -- cgit v1.2.3