Fix a crash if the gpu doesn't load.

E.g. for invalid files with multithreading enabled.
This commit is contained in:
Unknown W. Brackets committed 2013-11-06 07:49:32 -08:00
1 parent 51995a3d43
commit 82706ef82d
1 file changed
+4 -2
+4 -2
View File
@@ -260,8 +260,10 @@ void CPU_RunLoop() {
}
// Let's make sure the gpu has already cleaned up before we start freeing memory.
gpu->FinishEventLoop();
gpu->SyncThread(true);
if (gpu) {
gpu->FinishEventLoop();
gpu->SyncThread(true);
}
CPU_Shutdown();
CPU_SetState(CPU_THREAD_NOT_RUNNING);