From 575ac41ffd240ea15fa04b72acefc9f1b350ecb6 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Wed, 18 Nov 2015 11:01:02 -0700 Subject: layers: Fix infinite loop in DrawState --- layers/object_track.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layers/object_track.h b/layers/object_track.h index 3c379683..7847e24a 100644 --- a/layers/object_track.h +++ b/layers/object_track.h @@ -1050,8 +1050,9 @@ explicit_DestroyDescriptorPool( unordered_map::iterator itr = VkDescriptorSetMap.begin(); while (itr != VkDescriptorSetMap.end()) { OBJTRACK_NODE* pNode = (*itr).second; + auto del_itr = itr++; if (pNode->parentObj == reinterpret_cast(descriptorPool)) { - destroy_descriptor_set(device, reinterpret_cast((*itr++).first)); + destroy_descriptor_set(device, reinterpret_cast((*del_itr).first)); } } destroy_descriptor_pool(device, descriptorPool); -- cgit v1.2.3