projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[WIN32K]
[reactos.git]
/
reactos
/
win32ss
/
gdi
/
ntgdi
/
brush.cpp
diff --git
a/reactos/win32ss/gdi/ntgdi/brush.cpp
b/reactos/win32ss/gdi/ntgdi/brush.cpp
index
1049684
..
5671324
100644
(file)
--- a/
reactos/win32ss/gdi/ntgdi/brush.cpp
+++ b/
reactos/win32ss/gdi/ntgdi/brush.cpp
@@
-45,6
+45,11
@@
BRUSH::BRUSH(
this->ulSurfTime = 0;
this->pvRBrush = NULL;
this->hdev = NULL;
this->ulSurfTime = 0;
this->pvRBrush = NULL;
this->hdev = NULL;
+
+ /* FIXME: should be done only in PEN constructor,
+ but our destructor needs it! */
+ this->dwStyleCount = 0;
+ this->pStyle = NULL;
}
BRUSH::~BRUSH(
}
BRUSH::~BRUSH(
@@
-57,12
+62,18
@@
BRUSH::~BRUSH(
GdiPoolFree(GetBrushAttrPool(), this->pBrushAttr);
}
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);
}
{
GreSetBitmapOwner(this->hbmPattern, BASEOBJECT::OWNER::POWNED);
GreDeleteObject(this->hbmPattern);
}
+
+ /* Delete styles */
+ if ((this->pStyle != NULL) && !(this->flAttrs & BR_IS_DEFAULTSTYLE))
+ {
+ ExFreePoolWithTag(this->pStyle, GDITAG_PENSTYLE);
+ }
}
VOID
}
VOID