SDL: Fix use after free on shutdown

This commit is contained in:
Henrik Rydgård 2021-03-11 23:13:57 +01:00
parent 98f593fd5d
commit 6a3856674c

View file

@ -457,9 +457,9 @@ static void EmuThreadFunc(GraphicsContext *graphicsContext) {
UpdateRunLoop();
}
emuThreadState = (int)EmuThreadState::STOPPED;
graphicsContext->StopThread();
NativeShutdownGraphics();
graphicsContext->StopThread();
}
static void EmuThreadStart(GraphicsContext *context) {