From 603bf1fdfd5c4474f1e338a1e48df3f21a9a48c8 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 2 Sep 2021 23:08:24 +0600 Subject: [PATCH] Port close fix to unix_sdl.c --- src/unix/unix_sdl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix/unix_sdl.c b/src/unix/unix_sdl.c index db3b6e591..e5abdcd32 100644 --- a/src/unix/unix_sdl.c +++ b/src/unix/unix_sdl.c @@ -198,7 +198,8 @@ sdl_destroy_texture(void) void sdl_close(void) { - SDL_LockMutex(sdl_mutex); + if (sdl_mutex != NULL) + SDL_LockMutex(sdl_mutex); /* Unregister our renderer! */ video_setblit(NULL);