Fix crash on GL after saving a texture to disk, wrong thread access

This commit is contained in:
baldurk
2018-12-20 10:36:59 +00:00
parent e59fc15369
commit 1617b4618d
+7 -1
View File
@@ -3480,7 +3480,13 @@ void TextureViewer::on_saveTex_clicked()
m_SaveConfig.resourceId = id;
}
const ResourceId overlayTexID = m_Output->GetDebugOverlayTexID();
ResourceId overlayTexID;
if(m_TexDisplay.overlay != DebugOverlay::NoOverlay)
{
m_Ctx.Replay().BlockInvoke([this, &overlayTexID](IReplayController *r) {
overlayTexID = m_Output->GetDebugOverlayTexID();
});
}
const bool hasSelectedOverlay = (m_TexDisplay.overlay != DebugOverlay::NoOverlay);
const bool hasOverlay = (hasSelectedOverlay && overlayTexID != ResourceId());
TextureSaveDialog saveDialog(*texptr, hasOverlay, m_SaveConfig, this);