mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 16:36:11 +00:00
Prevent deletion of system-owned objects like brushes returned by
GetSysColorBrush() svn path=/trunk/; revision=8855
This commit is contained in:
parent
68d825d0da
commit
45931d5f5d
|
@ -8,6 +8,8 @@
|
|||
#include <win32k/kapi.h>
|
||||
#include <rosrtl/logfont.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
|
@ -555,11 +557,15 @@ SetWindowOrgEx(
|
|||
*/
|
||||
BOOL
|
||||
STDCALL
|
||||
DeleteObject(
|
||||
HGDIOBJ a0
|
||||
)
|
||||
DeleteObject(HGDIOBJ Obj)
|
||||
{
|
||||
return NtGdiDeleteObject(a0);
|
||||
if (0 != ((DWORD) Obj & 0x00800000))
|
||||
{
|
||||
DPRINT1("Trying to delete system object 0x%x\n", Obj);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return NtGdiDeleteObject(Obj);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue