diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-12-11 15:46:44 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-12-11 15:46:44 +0000 |
commit | 42c59d7c8fd1373e62fd0131852e9a631efd387a (patch) | |
tree | e11b883132ec0d890af28e2be0bd7ca54ac47d09 /tools/source | |
parent | 3f501d151f85261f8c826089b936f2a1b5e81ff3 (diff) |
Revert "just delete, don't check for null and then delete"
no time for this
This reverts commit 4b941b7b7fd79415935c8f2d3ce900eb64a40f66.
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/generic/poly.cxx | 10 |
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 ) |