Don't remove replacement when capture is closing

* There's no need, and this can cause races.
This commit is contained in:
baldurk
2020-07-16 20:39:25 +01:00
parent 498bab80e4
commit 7b191861e8
@@ -856,7 +856,8 @@ IShaderViewer *PipelineStateViewer::EditShader(ResourceId id, ShaderStage shader
// remove the replacement on close (we could make this more sophisticated if there
// was a place to control replaced resources/shaders).
ctx->Replay().AsyncInvoke([ctx, id](IReplayController *r) {
r->RemoveReplacement(id);
if(ctx->IsCaptureLoaded())
r->RemoveReplacement(id);
GUIInvoke::call(ctx->GetMainWindow()->Widget(), [ctx, id] { ctx->UnregisterReplacement(id); });
});
};