layers: Check for NULL ptrs while iterating over fenceMap
authorTobin Ehlis <tobin@lunarg.com>
Wed, 15 Apr 2015 20:25:02 +0000 (14:25 -0600)
committerChia-I Wu <olv@lunarg.com>
Thu, 16 Apr 2015 09:48:20 +0000 (17:48 +0800)
layers/mem_tracker.cpp

index 8394bc8..3dc0412 100644 (file)
@@ -250,7 +250,7 @@ static void retireQueueFences(VkQueue queue)
     map<uint64_t, MT_FENCE_INFO*>::iterator it = fenceMap.begin();
     map<uint64_t, MT_FENCE_INFO*>::iterator temp;
     while (it != fenceMap.end()) {
-        if (((*it).second)->queue == queue) {
+        if ((((*it).second) != NULL) && ((*it).second)->queue == queue) {
             temp = it;
             ++temp;
             deleteFenceInfo((*it).first);