summaryrefslogtreecommitdiff
path: root/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx')
-rw-r--r--sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
index a59143ba8d48..5d55176be2da 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
@@ -62,7 +62,7 @@ WriterInspectorTextPanel::WriterInspectorTextPanel(weld::Widget* pParent)
: InspectorTextPanel(pParent)
{
SwDocShell* pDocSh = static_cast<SwDocShell*>(SfxObjectShell::Current());
- m_pShell = pDocSh->GetWrtShell();
+ m_pShell = pDocSh ? pDocSh->GetWrtShell() : nullptr;
if (m_pShell)
{
m_oldLink = m_pShell->GetChgLnk();
@@ -71,7 +71,7 @@ WriterInspectorTextPanel::WriterInspectorTextPanel(weld::Widget* pParent)
// Update panel on start
std::vector<svx::sidebar::TreeNode> aStore;
- if (pDocSh->GetDoc()->GetEditShell()->GetCursor()->GetNode().GetTextNode())
+ if (pDocSh && pDocSh->GetDoc()->GetEditShell()->GetCursor()->GetNode().GetTextNode())
UpdateTree(pDocSh, aStore);
updateEntries(aStore);
}