1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Free the renderer only fter the textures in order to prevent double free

The reason is that the renderer tries to free the associated textures.
It generates assertion errors on macOS.
This commit is contained in:
Mathieu Schroeter 2018-02-05 18:22:31 +01:00
parent 8bfafd3e4e
commit 883ab7ca19

View File

@ -1038,14 +1038,15 @@ main (int argc, char * argv[])
break;
}
SDL_RemoveTimer (updateTimer);
FinishObjects ();
if (g_renderer)
SDL_DestroyRenderer (g_renderer);
if (g_window)
SDL_DestroyWindow (g_window);
SDL_RemoveTimer (updateTimer);
FinishObjects ();
SDL_Quit ();
if (g_updateThread)