mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
added check for hInstance in UnregisterClass()
svn path=/trunk/; revision=6907
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: class.c,v 1.43 2003/12/07 22:25:34 weiden Exp $
|
||||
/* $Id: class.c,v 1.44 2003/12/07 23:01:01 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -631,6 +631,13 @@ NtUserUnregisterClass(LPCWSTR ClassNameOrAtom,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(Class->hInstance && (Class->hInstance != hInstance))
|
||||
{
|
||||
ObmDereferenceObject(Class);
|
||||
SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(ObmGetReferenceCount(Class) > 2)
|
||||
{
|
||||
ObmDereferenceObject(Class);
|
||||
|
||||
Reference in New Issue
Block a user