Added support for non-deletable system brushes and pens created by
USER.

diff --git a/objects/dc.c b/objects/dc.c
index c33fb9f..5e978b4 100644
--- a/objects/dc.c
+++ b/objects/dc.c
@@ -117,8 +117,9 @@
 {
     GDIOBJHDR *ptr = GDI_GetObjPtr( hdc, MAGIC_DONTCARE );
     if (!ptr) return NULL;
-    if ((ptr->wMagic == DC_MAGIC) || (ptr->wMagic == METAFILE_DC_MAGIC) ||
-	(ptr->wMagic == ENHMETAFILE_DC_MAGIC))
+    if ((GDIMAGIC(ptr->wMagic) == DC_MAGIC) ||
+	(GDIMAGIC(ptr->wMagic) == METAFILE_DC_MAGIC) ||
+	(GDIMAGIC(ptr->wMagic) == ENHMETAFILE_DC_MAGIC))
         return (DC *)ptr;
     GDI_ReleaseObj( hdc );
     SetLastError( ERROR_INVALID_HANDLE );