From 0ca07c972df23534c50133c948cdbbd737c2dcaa Mon Sep 17 00:00:00 2001 From: Bill Medland Date: Tue, 20 Nov 2001 18:53:16 +0000 Subject: [PATCH] It is legal to call UnregisterClass with an hInstance of zero. --- windows/class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/class.c b/windows/class.c index 2be09d9dc68..ddc7cb6edd5 100644 --- a/windows/class.c +++ b/windows/class.c @@ -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 ); }