From 883ab7ca1903bc57ff5e03ae360a0cb9fe356621 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Mon, 5 Feb 2018 18:22:31 +0100 Subject: [PATCH] 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. --- src/blupi.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/blupi.cxx b/src/blupi.cxx index 1c83429..b4dc147 100644 --- a/src/blupi.cxx +++ b/src/blupi.cxx @@ -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)