summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-12-02 10:42:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-12-02 11:17:04 +0000
commit2b093d27b7e6f231512920f20089fcac291b021f (patch)
treeb320c820800e9d18a94c603f47314c7e31ea97e4 /sw
parent9939ffb9b87e536b3217232b732218e82126ad6c (diff)
crashtesting ooo84576-1.odt
fixes the SEGV crash, but not the massive memory leak Change-Id: I9d995bb9ba29b2e60386eb61e4a3b05b586c922c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143567 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unoobj2.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 90abc362431d..538ea72430b0 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -781,7 +781,8 @@ void SwXTextRange::SetPositions(const SwPaM& rPam)
m_pImpl->Invalidate();
IDocumentMarkAccess* const pMA = m_pImpl->m_rDoc.getIDocumentMarkAccess();
auto pMark = pMA->makeMark(rPam, OUString(), IDocumentMarkAccess::MarkType::UNO_BOOKMARK, sw::mark::InsertMode::New);
- m_pImpl->SetMark(*pMark);
+ if (pMark)
+ m_pImpl->SetMark(*pMark);
}
static void DeleteTable(SwDoc & rDoc, SwTable& rTable)