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);