sw/source/uibase/uno/unotxdoc.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 10e16862684c71361119565ee4dc6bdf3e217197 Author: Aron Budea <aron.bu...@collabora.com> AuthorDate: Mon Feb 15 21:46:45 2021 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Feb 17 09:29:51 2021 +0100 Avoid crash in online on a document with comments Crashed on a specific doc with the following backtrace: Thread 1 "kitbroker_001" received signal SIGSEGV, Segmentation fault. 0x00007f4807c76d44 in sw::annotation::SwAnnotationWin::GetPostItField (this=0x0) at /.../libreoffice/sw/inc/AnnotationWin.hxx:71 71 const SwPostItField* GetPostItField() const { return mpField; } 0 0x00007f4807c76d44 in sw::annotation::SwAnnotationWin::GetPostItField() const (this=0x0) at /.../libreoffice/sw/inc/AnnotationWin.hxx:71 1 0x00007f4807f0641b in SwXTextDocument::getPostIts(tools::JsonWriter&) (this=0x557e1d985a10, rJsonWriter=...) at /.../libreoffice/sw/source/uibase/uno/unotxdoc.cxx:3337 2 0x00007f4823216534 in getPostIts(LibreOfficeKitDocument*) (pThis=0x557e1d93c890) at /.../libreoffice/desktop/source/lib/init.cxx:3425 ... Change-Id: Ib97fd33fda936cad0c9ed3a29564fc0a49ff20c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110958 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index daa679684cb3..2ba12a2f6943 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3334,6 +3334,11 @@ void SwXTextDocument::getPostIts(tools::JsonWriter& rJsonWriter) { sw::annotation::SwAnnotationWin* pWin = sidebarItem->mpPostIt.get(); + if (!pWin) + { + continue; + } + const SwPostItField* pField = pWin->GetPostItField(); const SwRect& aRect = pWin->GetAnchorRect(); tools::Rectangle aSVRect(aRect.Pos().getX(), _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits