summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/node.hxx2
-rw-r--r--sw/source/core/docnode/node.cxx8
2 files changed, 4 insertions, 6 deletions
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index e16b797f641d..27078a918be4 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -350,7 +350,7 @@ class SW_DLLPUBLIC SwContentNode: public SwModify, public SwNode, public SwIndex
{
//FEATURE::CONDCOLL
- SwDepend* m_pCondColl;
+ std::unique_ptr<SwDepend> m_pCondColl;
//FEATURE::CONDCOLL
mutable bool mbSetModifyAtAttr;
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 3db76343d687..112d06e28173 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1012,7 +1012,7 @@ SwContentNode::~SwContentNode()
// Thus, we need to delete all Frames in the dependency list.
DelFrames(false);
- delete m_pCondColl;
+ m_pCondColl.reset();
if ( mpAttrSet.get() && mbSetModifyAtAttr )
const_cast<SwAttrSet*>(static_cast<const SwAttrSet*>(mpAttrSet.get()))->SetModifyAtAttr( nullptr );
@@ -1762,11 +1762,9 @@ void SwContentNode::SetCondFormatColl( SwFormatColl* pColl )
( pColl && pColl != m_pCondColl->GetRegisteredIn() ) )
{
SwFormatColl* pOldColl = GetCondFormatColl();
- delete m_pCondColl;
+ m_pCondColl.reset();
if( pColl )
- m_pCondColl = new SwDepend( this, pColl );
- else
- m_pCondColl = nullptr;
+ m_pCondColl.reset(new SwDepend( this, pColl ));
if( GetpSwAttrSet() )
{