Make sure we don't call the graphics driver after process detach.

This commit is contained in:
Alexandre Julliard 2005-08-10 09:56:23 +00:00
parent 65293d8edf
commit 1f90b5cff0
3 changed files with 12 additions and 0 deletions

View File

@ -137,6 +137,13 @@ static const USER_DRIVER *load_driver(void)
return driver;
}
/* unload the graphics driver on process exit */
void USER_unload_driver(void)
{
/* make sure we don't try to call the driver after it has been detached */
USER_Driver = &null_driver;
}
/**********************************************************************
* Null user driver

View File

@ -228,6 +228,9 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
case DLL_THREAD_DETACH:
thread_detach();
break;
case DLL_PROCESS_DETACH:
USER_unload_driver();
break;
}
return ret;
}

View File

@ -159,6 +159,8 @@ typedef struct tagUSER_DRIVER {
extern const USER_DRIVER *USER_Driver;
extern void USER_unload_driver(void);
struct received_message_info;
struct hook16_queue_info;