summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-06-01 11:57:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-06-01 16:02:34 +0200
commit1fe266c22fb7d277ae612cffd6cc89ef4dcb4269 (patch)
treee5ee09e5a915600cc736fad6b9a2b3d2ae6fdaca
parent7d8d65d850cdd0bdaa84e9cff9f8c1654c61ddb4 (diff)
Resolves: tdf#149408 inspector crash with a writer OLE inside calc
toplevel isn't a SwDocShell at this point, its a ScDocShell Change-Id: I3aa3c72e494cf6c0ceff1286a7026ca01385ab8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135236 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
index 46b1486f5e57..b043852d309e 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
@@ -64,7 +64,7 @@ WriterInspectorTextPanel::WriterInspectorTextPanel(weld::Widget* pParent)
: InspectorTextPanel(pParent)
, m_nParIdx(0)
{
- SwDocShell* pDocSh = static_cast<SwDocShell*>(SfxObjectShell::Current());
+ SwDocShell* pDocSh = dynamic_cast<SwDocShell*>(SfxObjectShell::Current());
m_pShell = pDocSh ? pDocSh->GetWrtShell() : nullptr;
if (m_pShell)
{