From fff4029047880e4a582ee6593618cc6286e28b7b Mon Sep 17 00:00:00 2001 From: SirLynix Date: Sun, 2 Jul 2023 14:02:11 +0200 Subject: [PATCH] Graphics/ForwardFramePipeline: Fix crash when removing a viewer --- src/Nazara/Graphics/ForwardFramePipeline.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Nazara/Graphics/ForwardFramePipeline.cpp b/src/Nazara/Graphics/ForwardFramePipeline.cpp index 1527dcc27..52109687f 100644 --- a/src/Nazara/Graphics/ForwardFramePipeline.cpp +++ b/src/Nazara/Graphics/ForwardFramePipeline.cpp @@ -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)