mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
Prevent deletion of system-owned objects like brushes returned by
GetSysColorBrush() svn path=/trunk/; revision=8855
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user