It is legal to call UnregisterClass with an hInstance of zero.
This commit is contained in:
parent
5c84fff413
commit
0ca07c972d
|
@ -409,7 +409,7 @@ static BOOL CLASS_UnregisterClass( ATOM atom, HINSTANCE hInstance )
|
||||||
USER_Lock();
|
USER_Lock();
|
||||||
if (atom &&
|
if (atom &&
|
||||||
(classPtr = CLASS_FindClassByAtom( atom, hInstance )) &&
|
(classPtr = CLASS_FindClassByAtom( atom, hInstance )) &&
|
||||||
(classPtr->hInstance == hInstance))
|
(!hInstance || classPtr->hInstance == hInstance))
|
||||||
{
|
{
|
||||||
ret = CLASS_FreeClass( classPtr );
|
ret = CLASS_FreeClass( classPtr );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue