Graphics/ForwardFramePipeline: Fix crash when removing a viewer

This commit is contained in:
SirLynix 2023-07-02 14:02:11 +02:00
parent b66c50a5da
commit fff4029047
1 changed files with 2 additions and 1 deletions

View File

@ -307,7 +307,7 @@ namespace Nz
renderFrame.PushForRelease(std::move(*m_viewerPool.RetrieveFromIndex(viewerIndex)));
m_viewerPool.Free(viewerIndex);
}
m_removedSkeletonInstances.Clear();
m_removedViewerInstances.Clear();
for (std::size_t worldInstanceIndex = m_removedWorldInstances.FindFirst(); worldInstanceIndex != m_removedWorldInstances.npos; worldInstanceIndex = m_removedWorldInstances.FindNext(worldInstanceIndex))
{
@ -518,6 +518,7 @@ namespace Nz
{
// Defer world instance release
m_removedViewerInstances.UnboundedSet(viewerIndex);
m_rebuildFrameGraph = true;
}
void ForwardFramePipeline::UnregisterWorldInstance(std::size_t worldInstance)