Fix memory leak in EMFPPen.
Delete dashPattern, compoundArray, customStartCap and customEndCap arrays if they were created in the destructor. Change-Id: I5f3821b1ab0ac31a9cd4bc402c04090585953573 Reviewed-on: https://gerrit.libreoffice.org/4821 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
This commit is contained in:
committed by
David Tardon
parent
3f1a58884e
commit
cb14b1e56d
@@ -604,6 +604,18 @@ namespace cppcanvas
|
|||||||
public:
|
public:
|
||||||
EMFPPen () : EMFPBrush ()
|
EMFPPen () : EMFPBrush ()
|
||||||
{
|
{
|
||||||
|
dashPattern = NULL;
|
||||||
|
compoundArray = NULL;
|
||||||
|
customStartCap = NULL;
|
||||||
|
customEndCap = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
~EMFPPen ()
|
||||||
|
{
|
||||||
|
delete[] dashPattern;
|
||||||
|
delete[] compoundArray;
|
||||||
|
delete[] customStartCap;
|
||||||
|
delete[] customEndCap;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetStrokeAttributes (rendering::StrokeAttributes& rStrokeAttributes, ImplRenderer& rR, const OutDevState& rState)
|
void SetStrokeAttributes (rendering::StrokeAttributes& rStrokeAttributes, ImplRenderer& rR, const OutDevState& rState)
|
||||||
|
Reference in New Issue
Block a user