sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit f23faaa44b8bde98bd979032fda9bfce71f7ff96 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Jun 1 11:57:30 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Jun 1 16:32:09 2022 +0200 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.st...@allotropia.de> Tested-by: Jenkins 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) {