diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-09-23 00:19:21 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-09-23 00:47:12 +0200 |
commit | 7597a4915d68da04f234f5fd2186287a17a94a5d (patch) | |
tree | aa82918696b4bcf01631b792a0d79b192b28e9b1 /sw | |
parent | 02b406b5cbc1c631b794154e5169838edbe3e2b5 (diff) |
sw: actually SetTableNode() ought to always be called before delete
Change-Id: I5e830e91ae7c773ad3945550c640a190b6504796
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/fields/ddetbl.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx index 4680323f0068..0047f22f8296 100644 --- a/sw/source/core/fields/ddetbl.cxx +++ b/sw/source/core/fields/ddetbl.cxx @@ -65,10 +65,13 @@ SwDDETable::~SwDDETable() { SwDDEFieldType* pFieldTyp = static_cast<SwDDEFieldType*>(aDepend.GetRegisteredIn()); SwDoc* pDoc = GetFrameFormat()->GetDoc(); - if (!pDoc->IsInDtor() && !m_aLines.empty() && - m_pTableNode && m_pTableNode->GetNodes().IsDocNodes()) + if (!pDoc->IsInDtor() && !m_aLines.empty()) { - pFieldTyp->DecRefCnt(); + assert(m_pTableNode); + if (m_pTableNode->GetNodes().IsDocNodes()) + { + pFieldTyp->DecRefCnt(); + } } // If it is the last dependent of the "deleted field" than delete it finally |