diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx index 48c2de119311..b0a0258864c5 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); } |