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