mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-24 06:36:08 +00:00
When deleting objects for a context, don't double-increment iterator
This commit is contained in:
@@ -104,7 +104,7 @@ public:
|
||||
void DeleteContext(void *context)
|
||||
{
|
||||
size_t count = 0;
|
||||
for(auto it = m_CurrentResourceIds.begin(); it != m_CurrentResourceIds.end(); it++)
|
||||
for(auto it = m_CurrentResourceIds.begin(); it != m_CurrentResourceIds.end();)
|
||||
{
|
||||
if(it->first.ContextShareGroup == context && it->first.Namespace != eResSpecial)
|
||||
{
|
||||
@@ -116,6 +116,10 @@ public:
|
||||
ReleaseCurrentResource(it->second);
|
||||
it = m_CurrentResourceIds.erase(it);
|
||||
}
|
||||
else
|
||||
{
|
||||
++it;
|
||||
}
|
||||
}
|
||||
RDCDEBUG("Removed %zu/%zu resources belonging to context/sharegroup %p", count,
|
||||
m_CurrentResourceIds.size(), context);
|
||||
|
||||
Reference in New Issue
Block a user