layers: Add lock around erase from frameBufferMap in core_validation
authorTony Barbour <tony@LunarG.com>
Mon, 21 Mar 2016 23:18:07 +0000 (17:18 -0600)
committerTony Barbour <tony@LunarG.com>
Mon, 21 Mar 2016 23:18:07 +0000 (17:18 -0600)
Change-Id: I042573b54876e63c19140948a26d388934e1a3c9

layers/core_validation.cpp

index a338ffa..03d1e4f 100644 (file)
@@ -6364,7 +6364,9 @@ vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocat
                 loader_platform_thread_unlock_mutex(&globalLock);
             }
         }
+        loader_platform_thread_lock_mutex(&globalLock);
         dev_data->frameBufferMap.erase(framebuffer);
+        loader_platform_thread_unlock_mutex(&globalLock);
     }
     dev_data->device_dispatch_table->DestroyFramebuffer(device, framebuffer, pAllocator);
 }