Make sure we don't call the graphics driver after process detach.
This commit is contained in:
parent
65293d8edf
commit
1f90b5cff0
|
@ -137,6 +137,13 @@ static const USER_DRIVER *load_driver(void)
|
||||||
return driver;
|
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
|
* Null user driver
|
||||||
|
|
|
@ -228,6 +228,9 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
|
||||||
case DLL_THREAD_DETACH:
|
case DLL_THREAD_DETACH:
|
||||||
thread_detach();
|
thread_detach();
|
||||||
break;
|
break;
|
||||||
|
case DLL_PROCESS_DETACH:
|
||||||
|
USER_unload_driver();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,6 +159,8 @@ typedef struct tagUSER_DRIVER {
|
||||||
|
|
||||||
extern const USER_DRIVER *USER_Driver;
|
extern const USER_DRIVER *USER_Driver;
|
||||||
|
|
||||||
|
extern void USER_unload_driver(void);
|
||||||
|
|
||||||
struct received_message_info;
|
struct received_message_info;
|
||||||
struct hook16_queue_info;
|
struct hook16_queue_info;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue