From 6d00b48eefc16560127dc09aeb2a0394f21e0a31 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 21 Sep 2018 03:19:29 +0200 Subject: [PATCH] Before displaying the message box, fatal() now calls do_stop() in order to make sure the emulator exit is clean. --- src/pc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pc.c b/src/pc.c index 0c5b5f054..3fe00755e 100644 --- a/src/pc.c +++ b/src/pc.c @@ -8,7 +8,7 @@ * * Main emulator module where most things are controlled. * - * Version: @(#)pc.c 1.0.78 2018/09/19 + * Version: @(#)pc.c 1.0.79 2018/09/21 * * Authors: Sarah Walker, * Miran Grca, @@ -261,6 +261,10 @@ fatal(const char *fmt, ...) /* Make sure the message does not have a trailing newline. */ if ((sp = strchr(temp, '\n')) != NULL) *sp = '\0'; + /* Cleanly terminate all of the emulator's components so as + to avoid things like threads getting stuck. */ + do_stop(); + ui_msgbox(MBX_ERROR|MBX_FATAL|MBX_ANSI, temp); fflush(stdlog);