Clear out state before deserialization - fixes many crashes.

This commit is contained in:
Hamish Milne 2020-04-01 22:06:22 +01:00
parent f156fdd332
commit 5b6ee9a6ab
5 changed files with 24 additions and 9 deletions

View file

@ -132,7 +132,9 @@ void OpenGLWindow::Present() {
return;
context->makeCurrent(this);
VideoCore::g_renderer->TryPresent(100);
if (VideoCore::g_renderer) {
VideoCore::g_renderer->TryPresent(100);
}
context->swapBuffers(this);
auto f = context->versionFunctions<QOpenGLFunctions_3_3_Core>();
f->glFinish();