sw/source/uibase/uno/unotxdoc.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit a237eaf581fe63eae36ff9e90a45166d1763f1ef Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Nov 14 15:11:13 2024 +0000 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Nov 29 14:29:32 2024 +0100 m_pDocShell seen as null in SwXTextDocument::getPostIts #2 SwView::GetPostItMgr (this=<error reading variable: Cannot access memory at address 0xc8>) at sw/inc/view.hxx:659 #3 SwXTextDocument::getPostIts(tools::JsonWriter&) () at sw/source/uibase/uno/unotxdoc.cxx:3351 #4 0x00007f6238ac7cc8 in getPostIts (pThis=0x36aa6cb0) at /opt/rh/devtoolset-12/root/usr/include/c++/12/ext/atomicity.h:111 #5 doc_getCommandValues () at desktop/source/lib/init.cxx:6739 #6 0x00000000005863e0 in lok::Document::getCommandValues (pCommand=<optimized out>, this=<optimized out>) at /home/collabora/jenkins/workspace/package_cool_24.04_rpm/rpmbuild/BUILD/coolwsd-24.04.9.2snapshot/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx:492 #7 ChildSession::getCommandValues(StringVector const&) () at kit/ChildSession.cpp:1180 Change-Id: Ib2a3c2e7eb1a108ad969588f6c313cade145e8ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176600 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> (cherry picked from commit c0542a438d91051bcdab1f5bc19ee46c90bd91a7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177517 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> (cherry picked from commit e854f1d7a0a3a8bac6429a1dbe80ab2a6973c00a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177526 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index f0587a8f6b5f..07b052541eb4 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3416,6 +3416,8 @@ void SwXTextDocument::getPostIts(tools::JsonWriter& rJsonWriter) { SolarMutexGuard aGuard; auto commentsNode = rJsonWriter.startArray("comments"); + if (!m_pDocShell) + return; for (auto const& sidebarItem : *m_pDocShell->GetView()->GetPostItMgr()) { sw::annotation::SwAnnotationWin* pWin = sidebarItem->mpPostIt.get();