Commit 0ca07c97 authored by Bill Medland's avatar Bill Medland Committed by Alexandre Julliard

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

parent 5c84fff4
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment