From d281862b290f8ee309892e6301623fcb1e99e5bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Sun, 17 Mar 2024 17:29:20 -0400
Subject: [PATCH] Call exit() from exit_sdl_con if ciolib_reaper is enabled and
 SDL is not initialized.

---
 src/conio/sdl_con.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/conio/sdl_con.c b/src/conio/sdl_con.c
index 9f0046d6a4..a102eeb61a 100644
--- a/src/conio/sdl_con.c
+++ b/src/conio/sdl_con.c
@@ -296,6 +296,10 @@ void exit_sdl_con(void)
 	ciolib_reaper = 0;
 	if (sdl_init_good)
 		sdl_user_func_ret(SDL_USEREVENT_QUIT);
+	else {
+		if (ciolib_reaper)
+			exit(0);
+	}
 }
 
 void sdl_copytext(const char *text, size_t buflen)
-- 
GitLab