[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/source

Jan Holesovsky kendy at collabora.com
Thu Apr 13 16:49:53 UTC 2017


 sw/source/uibase/docvw/PostItMgr.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5387e8c8dc2484a6a30f0792e168c7621d1a5d50
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Apr 13 18:48:24 2017 +0200

    Don't crash when deleting a non-existing comment.
    
    Change-Id: If03f19c988f4c7ba6dfe1d3058c71ec11cd1b732

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 61a4d0e56a1f..e72717360279 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -1525,7 +1525,7 @@ void SwPostItMgr::Delete(sal_uInt32 nPostItId)
     IsPostitFieldWithPostitId aFilter(nPostItId);
     FieldDocWatchingStack aStack(mvPostItFields, *mpView->GetDocShell(), aFilter);
     const SwFormatField* pField = aStack.pop();
-    if (mpWrtShell->GotoField(*pField))
+    if (pField && mpWrtShell->GotoField(*pField))
         mpWrtShell->DelRight();
     mpWrtShell->EndUndo();
     PrepareView();


More information about the Libreoffice-commits mailing list