diff --git a/src/conio/sdl_con.c b/src/conio/sdl_con.c
index 9a2f1e663ab181121061b618ac68963f79026258..9f0046d6a4d338454dc9c86da561788c510d2e29 100644
--- a/src/conio/sdl_con.c
+++ b/src/conio/sdl_con.c
@@ -294,7 +294,8 @@ void exit_sdl_con(void)
 {
 	// Avoid calling exit(0) from an atexit() function...
 	ciolib_reaper = 0;
-	sdl_user_func_ret(SDL_USEREVENT_QUIT);
+	if (sdl_init_good)
+		sdl_user_func_ret(SDL_USEREVENT_QUIT);
 }
 
 void sdl_copytext(const char *text, size_t buflen)