sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 1e3bebc5cd92f14199cd47818fe6a42a9c18db6c Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Dec 22 13:28:14 2022 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Dec 26 10:47:18 2022 +0000 sw: check for nullptr in WriterInspectorTextPanel GetEditShell() in sw/source/core/doc/doccorr.cxx might return nullptr See https://crashreport.libreoffice.org/stats/crash_details/75a28cf5-cf45-4d36-a1aa-471a0ad9251a Change-Id: I3de2dec461d590841d4ea3b7d98f384ee27ad4ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144757 Tested-by: Jenkins Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 37ca1154f392dd9eefad8250509652b845434793) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144723 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144772 (cherry picked from commit 2c2398d234ddd6afae44af1ca92c3e43f7e7bfb3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144800 diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx index dd28cc195c4c..8f92235f01fb 100644 --- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx +++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx @@ -74,7 +74,8 @@ WriterInspectorTextPanel::WriterInspectorTextPanel(weld::Widget* pParent) // Update panel on start std::vector<svx::sidebar::TreeNode> aStore; - if (pDocSh && pDocSh->GetDoc()->GetEditShell()->GetCursor()->GetNode().GetTextNode()) + if (pDocSh && pDocSh->GetDoc()->GetEditShell() + && pDocSh->GetDoc()->GetEditShell()->GetCursor()->GetNode().GetTextNode()) UpdateTree(pDocSh, aStore, m_nParIdx); updateEntries(aStore, m_nParIdx); } @@ -737,7 +738,8 @@ IMPL_LINK(WriterInspectorTextPanel, AttrChangedNotify, LinkParamNone*, pLink, vo SwDocShell* pDocSh = m_pShell->GetDoc()->GetDocShell(); std::vector<svx::sidebar::TreeNode> aStore; - if (pDocSh && pDocSh->GetDoc()->GetEditShell()->GetCursor()->GetNode().GetTextNode()) + if (pDocSh && pDocSh->GetDoc()->GetEditShell() + && pDocSh->GetDoc()->GetEditShell()->GetCursor()->GetNode().GetTextNode()) UpdateTree(pDocSh, aStore, m_nParIdx); updateEntries(aStore, m_nParIdx);