[Libreoffice-commits] core.git: sw/source
Jan Holesovsky
kendy at collabora.com
Thu Apr 13 16:51:30 UTC 2017
sw/source/uibase/docvw/PostItMgr.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 2fd2a7f9b3a866cf4d31f9b496d8f6fd221d75e8
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 2e67fc07aa2e..6b2f3e4c567c 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -1524,7 +1524,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