Don't remove resource records for stale resources on GL

* If we destroy a resource e.g. FBO 4 in a captured frame, its record will stay
  alive until the end. When we delete that record we don't want to remove the
  record that is now recorded for FBO 4 since that might be a new resource that
  has been created. If the ID doesn't match then the original resource
  destruction has already been processed and the record is now orphaned, so
  nothing has to happen.
This commit is contained in:
baldurk
2020-10-01 10:41:53 +01:00
parent 3c180d900c
commit 5ae5cb8bcf
+1 -1
View File
@@ -138,7 +138,7 @@ public:
if(record)
{
auto it = m_CurrentResources.find(record->Resource);
if(it != m_CurrentResources.end())
if(it != m_CurrentResources.end() && it->second.first == id)
it->second.second = NULL;
}