Fix a crash if capture viewers are changed while processing SetEvent

* This could happen in particular now that thumbnails are capture viewers.
This commit is contained in:
baldurk
2021-01-21 11:28:23 +00:00
parent c002c71fe8
commit a4fd53af8f
+4 -2
View File
@@ -1591,9 +1591,11 @@ void CaptureContext::RefreshUIStatus(const rdcarray<ICaptureViewer *> &exclude,
PointerTypeRegistry::CacheShader(refl);
}
for(ICaptureViewer *viewer : m_CaptureViewers)
rdcarray<ICaptureViewer *> capviewers(m_CaptureViewers);
for(ICaptureViewer *viewer : capviewers)
{
if(exclude.contains(viewer))
if(!viewer || exclude.contains(viewer) || !m_CaptureViewers.contains(viewer))
continue;
if(updateSelectedEvent)