summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2020-10-15 08:19:39 +0200
committerAron Budea <aron.budea@collabora.com>2020-10-15 21:56:12 +0200
commitdf74aef7159d7155addf78cfc4d139485945d794 (patch)
treef9531d5e1b111d91da3f8890264ba15366f22c93 /sw
parenta4dab1759a7303da8b460ad9d8e6c6cbda812be2 (diff)
tdf#137105: crash in table with Style Inspector active
xParaEnum->nextElement() is not an XTextRange then, it'd be an XTextTable. Since the Style Inspector doesn't support inspecting table properties, yet, simply avoid that case. Change-Id: I4ae211713433ccc30d397c04f6cbf7f1f4d1f9e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104327 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
index d7b3990aa5e3..6dfaf8ccd966 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
@@ -500,9 +500,9 @@ static void UpdateTree(SwDocShell* pDocSh, std::vector<svx::sidebar::TreeNode>&
// Collect paragraph direct formatting
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xRange, uno::UNO_QUERY_THROW);
uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
- uno::Reference<text::XTextRange> xThisParagraphRange(xParaEnum->nextElement(),
- uno::UNO_QUERY_THROW);
- InsertValues(xThisParagraphRange, aIsDefined, aParaDFNode, false, aHiddenProperties);
+ uno::Reference<text::XTextRange> xThisParagraphRange(xParaEnum->nextElement(), uno::UNO_QUERY);
+ if (xThisParagraphRange.is())
+ InsertValues(xThisParagraphRange, aIsDefined, aParaDFNode, false, aHiddenProperties);
xStyleFamily.set(xStyleFamilies->getByName("ParagraphStyles"), uno::UNO_QUERY_THROW);