It is legal to call UnregisterClass with an hInstance of zero.

This commit is contained in:
Bill Medland 2001-11-20 18:53:16 +00:00 committed by Alexandre Julliard
parent 5c84fff413
commit 0ca07c972d
1 changed files with 1 additions and 1 deletions

View File

@ -409,7 +409,7 @@ static BOOL CLASS_UnregisterClass( ATOM atom, HINSTANCE hInstance )
USER_Lock();
if (atom &&
(classPtr = CLASS_FindClassByAtom( atom, hInstance )) &&
(classPtr->hInstance == hInstance))
(!hInstance || classPtr->hInstance == hInstance))
{
ret = CLASS_FreeClass( classPtr );
}