diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-30 16:59:40 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-09-03 16:36:17 +0200 |
commit | d3e07a584fc92c548d6356116448e202a2766d11 (patch) | |
tree | 9409045b0da18c3214b6d9de34b5740cb3ff5f37 | |
parent | e6a0d77e144cf41459cc1124244638e562b8d0db (diff) |
Resolves: tdf#119607 crash in calling getPropertyState on TextParagraph
Change-Id: Ib7091473e3547241e95dc3d3921abf650f288aff
Reviewed-on: https://gerrit.libreoffice.org/59825
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | sw/source/core/unocore/unocrsrhelper.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index ad54ef7383e1..227c08f131bc 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -599,8 +599,11 @@ bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry SwTextNode* pTextNode = rPam.GetPoint()->nNode.GetNode().GetTextNode(); if (pTextNode) { - uno::Reference<text::XTextContent> xParagraph = SwXParagraph::CreateXParagraph(*pTextNode->GetDoc(), pTextNode); - *pAny <<= xParagraph; + if (pAny) + { + uno::Reference<text::XTextContent> xParagraph = SwXParagraph::CreateXParagraph(*pTextNode->GetDoc(), pTextNode); + *pAny <<= xParagraph; + } } else eNewState = PropertyState_DEFAULT_VALUE; |