[Libreoffice-commits] core.git: tools/source
Caolán McNamara
caolanm at redhat.com
Mon Dec 11 15:49:59 UTC 2017
tools/source/generic/poly.cxx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 42c59d7c8fd1373e62fd0131852e9a631efd387a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 11 15:46:44 2017 +0000
Revert "just delete, don't check for null and then delete"
no time for this
This reverts commit 4b941b7b7fd79415935c8f2d3ce900eb64a40f66.
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index c00627965c64..664428426352 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -516,8 +516,11 @@ bool ImplPolygon::operator==( const ImplPolygon& rCandidate) const
ImplPolygon::~ImplPolygon()
{
- delete[] mpPointAry;
- delete[] mpFlagAry;
+ if ( mpPointAry )
+ delete[] mpPointAry;
+
+ if( mpFlagAry )
+ delete[] mpFlagAry;
}
void ImplPolygon::ImplInitDefault()
@@ -583,7 +586,8 @@ void ImplPolygon::ImplSetSize( sal_uInt16 nNewSize, bool bResize )
else
pNewAry = nullptr;
- delete[] mpPointAry;
+ if ( mpPointAry )
+ delete[] mpPointAry;
// take FlagArray into account, if applicable
if( mpFlagAry )
More information about the Libreoffice-commits
mailing list