Don't modify states/variables list on replay thread

* Otherwise this can race with the UI thread if it's executing a shortcut.
This commit is contained in:
baldurk
2020-03-30 21:47:39 +01:00
parent cfe5f8e975
commit 27f2a4b7f9
+7 -7
View File
@@ -620,15 +620,15 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
r->SetFrameEvent(m_Ctx.CurEvent(), true);
m_States = states;
GUIInvoke::call(this, [this, states]() {
m_States = states;
if(!m_States.empty())
{
for(const ShaderVariableChange &c : GetCurrentState().changes)
m_Variables.push_back(c.after);
}
if(!m_States.empty())
{
for(const ShaderVariableChange &c : GetCurrentState().changes)
m_Variables.push_back(c.after);
}
GUIInvoke::call(this, [this]() {
bool preferSourceDebug = false;
for(const ShaderCompileFlag &flag : m_ShaderDetails->debugInfo.compileFlags.flags)