mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 08:40:55 +00:00
Don't delete from m_CurrentResources when removing resource record
* This is handled when the resource is destroyed itself, we just NULL out the pointer.
This commit is contained in:
@@ -133,13 +133,13 @@ public:
|
||||
|
||||
inline void RemoveResourceRecord(ResourceId id)
|
||||
{
|
||||
for(auto it = m_CurrentResources.begin(); it != m_CurrentResources.end(); it++)
|
||||
GLResourceRecord *record = ResourceManager::GetResourceRecord(id);
|
||||
|
||||
if(record)
|
||||
{
|
||||
if(it->second.first == id)
|
||||
{
|
||||
m_CurrentResources.erase(it);
|
||||
break;
|
||||
}
|
||||
auto it = m_CurrentResources.find(record->Resource);
|
||||
if(it != m_CurrentResources.end())
|
||||
it->second.second = NULL;
|
||||
}
|
||||
|
||||
ResourceManager::RemoveResourceRecord(id);
|
||||
|
||||
Reference in New Issue
Block a user