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.
This commit is contained in:
James Juran 1999-04-10 16:33:56 +00:00 committed by Alexandre Julliard
parent 73663071c6
commit fcf353f2b9
1 changed files with 4 additions and 2 deletions

View File

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