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:
parent
8bfafd3e4e
commit
883ab7ca19
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user