sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 8d2421f69afead098003eec63c809c2403924b6c Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Jun 1 11:57:30 2022 +0100 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Wed Jun 1 19:06:21 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 (cherry picked from commit f23faaa44b8bde98bd979032fda9bfce71f7ff96) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135258 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> 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) {