summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-06-01 11:57:30 +0100
committerAndras Timar <andras.timar@collabora.com>2022-06-09 11:00:57 +0200
commitc3df2d673cc12baa1f851510348a785d3e4566fa (patch)
treeadd79445daa13fcf8c262aa125ce4f7bc906c906
parentd7460745dfda789952744dd2dc74793dde03e47e (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/+/135173 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
-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 33d2ae6774e0..9ecce3226ac7 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
@@ -65,7 +65,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)
{