diff options
-rw-r--r-- | lotuswordpro/source/filter/lwpdrawobj.cxx | 7 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpdrawobj.hxx | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index abc7326be812..b1711065217d 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -484,11 +484,6 @@ LwpDrawPolyLine::LwpDrawPolyLine(SvStream * pStream, DrawingOffsetAndScale* pTra } LwpDrawPolyLine::~LwpDrawPolyLine() { - if (m_pVector) - { - delete [] m_pVector; - m_pVector = nullptr; - } } /** @@ -508,7 +503,7 @@ void LwpDrawPolyLine::Read() if (m_aPolyLineRec.nNumPoints > m_pStream->remainingSize() / 4) throw BadRead(); - m_pVector= new SdwPoint[m_aPolyLineRec.nNumPoints]; + m_pVector.reset( new SdwPoint[m_aPolyLineRec.nNumPoints] ); for (sal_uInt16 nC = 0; nC < m_aPolyLineRec.nNumPoints; nC++) { diff --git a/lotuswordpro/source/filter/lwpdrawobj.hxx b/lotuswordpro/source/filter/lwpdrawobj.hxx index 61d2c09e8c3b..647a715eb30e 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.hxx +++ b/lotuswordpro/source/filter/lwpdrawobj.hxx @@ -187,7 +187,7 @@ class LwpDrawPolyLine : public LwpDrawObj { private: SdwPolyLineRecord m_aPolyLineRec; - SdwPoint* m_pVector; + std::unique_ptr<SdwPoint[]> m_pVector; public: LwpDrawPolyLine(SvStream * pStream, DrawingOffsetAndScale* pTransData); |