Commit in reactos/lib/gdi32/objects on MAIN
dc.c+10-41.27 -> 1.28
Prevent deletion of system-owned objects like brushes returned by
GetSysColorBrush()

reactos/lib/gdi32/objects
dc.c 1.27 -> 1.28
diff -u -r1.27 -r1.28
--- dc.c	23 Mar 2004 19:46:49 -0000	1.27
+++ dc.c	23 Mar 2004 22:50:14 -0000	1.28
@@ -8,6 +8,8 @@
 #include <win32k/kapi.h>
 #include <rosrtl/logfont.h>
 
+#define NDEBUG
+#include <debug.h>
 
 /*
  * @implemented
@@ -555,11 +557,15 @@
  */
 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);
 }
 
 
CVSspam 0.2.8