tools/source/generic/poly.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
New commits: commit 42c59d7c8fd1373e62fd0131852e9a631efd387a Author: Caolán McNamara <[email protected]> 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 )
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
