Skip to content

Commit

Permalink
m_pDocShell seen as null in SwXTextDocument::getPostIts
Browse files Browse the repository at this point in the history
 #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 <[email protected]>
Reviewed-by: Andras Timar <[email protected]>
(cherry picked from commit c0542a4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177517
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
(cherry picked from commit e854f1d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177526
Reviewed-by: Xisco Fauli <[email protected]>
(cherry picked from commit a237eaf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177531
Reviewed-by: Christian Lohmaier <[email protected]>
Tested-by: Christian Lohmaier <[email protected]>
Reviewed-by: Michael Stahl <[email protected]>
  • Loading branch information
caolanm authored and cloph committed Dec 10, 2024
1 parent b9113b2 commit 0d5edbc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sw/source/uibase/uno/unotxdoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0d5edbc

Please sign in to comment.