summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
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);