From fcf353f2b9d80124c42d4d4a15ad9ec03cc3aa3a Mon Sep 17 00:00:00 2001 From: James Juran Date: Sat, 10 Apr 1999 16:33:56 +0000 Subject: [PATCH] Check for drivers==NULL before trying to delete them at exit. This could happen if the emulator initialization failed for some reason and the drivers hadn't been initialized yet. --- misc/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/main.c b/misc/main.c index e759b7c0c1d..21365bee935 100644 --- a/misc/main.c +++ b/misc/main.c @@ -756,8 +756,10 @@ static void MAIN_ParseOptions( int *argc, char *argv[] ) */ static void called_at_exit(void) { - GDI_Driver->pFinalize(); - USER_Driver->pFinalize(); + if (GDI_Driver) + GDI_Driver->pFinalize(); + if (USER_Driver) + USER_Driver->pFinalize(); WINSOCK_Shutdown(); CONSOLE_Close();