Author: khornicek
Date: Fri Feb 17 13:13:36 2017
New Revision: 73812

URL: http://svn.reactos.org/svn/reactos?rev=73812&view=rev
Log:
[WIN32K]
- The pattern bitmap can get deleted during the GDI cleanup for process before 
the brush itself.
- Gets rid of some of those pesky "GreDeleteObject: Trying to delete invalid 
object" debug prints.

Modified:
    trunk/reactos/win32ss/gdi/ntgdi/brush.cpp

Modified: trunk/reactos/win32ss/gdi/ntgdi/brush.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/brush.cpp?rev=73812&r1=73811&r2=73812&view=diff
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/brush.cpp   [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/brush.cpp   [iso-8859-1] Fri Feb 17 
13:13:36 2017
@@ -62,8 +62,8 @@
         GdiPoolFree(GetBrushAttrPool(), this->pBrushAttr);
     }
 
-    /* Delete the pattern bitmap */
-    if (this->hbmPattern != NULL)
+    /* Delete the pattern bitmap (may have already been deleted during gdi 
cleanup) */
+    if (this->hbmPattern != NULL && GreIsHandleValid(this->hbmPattern))
     {
         GreSetBitmapOwner(this->hbmPattern, BASEOBJECT::OWNER::POWNED);
         GreDeleteObject(this->hbmPattern);


Reply via email to