Skip to content

Commit f058a01

Browse files
committed
SDL: Call DirkSimple_shutdown() before destroying SDL-specific resources.
Otherwise you end up destroying textures after the renderer has been destroyed.
1 parent 7ab41f0 commit f058a01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dirksimple_sdl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ void DirkSimple_cleardiscaudio(void)
287287

288288
void mainloop_shutdown(void)
289289
{
290+
DirkSimple_shutdown();
291+
290292
SDL_DestroyTexture(GLaserDiscTexture);
291293
SDL_DestroyRenderer(GRenderer);
292294
SDL_DestroyWindow(GWindow);
@@ -307,8 +309,6 @@ void mainloop_shutdown(void)
307309
GGameController = NULL;
308310
}
309311

310-
DirkSimple_shutdown();
311-
312312
SDL_Quit();
313313
}
314314

0 commit comments

Comments
 (0)