summaryrefslogtreecommitdiff
path: root/tools/source/generic/poly.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tools/source/generic/poly.cxx')
-rw-r--r--tools/source/generic/poly.cxx10
1 files changed, 7 insertions, 3 deletions
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 )