mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
added check for hInstance in UnregisterClass()
svn path=/trunk/; revision=6907
This commit is contained in:
parent
088e628e66
commit
bfcd20af5e
1 changed files with 8 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue