summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-04-13 18:48:24 +0200
committerJan Holesovsky <kendy@collabora.com>2017-04-13 18:50:45 +0200
commit2fd2a7f9b3a866cf4d31f9b496d8f6fd221d75e8 (patch)
tree017e8bd99124fcc97032e793887a8ed95ad46a4c
parent608e93bce9d72ccabadeb6707f9a29c3499fd32e (diff)
Don't crash when deleting a non-existing comment.
Change-Id: If03f19c988f4c7ba6dfe1d3058c71ec11cd1b732
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx2
1 files changed, 1 insertions, 1 deletions
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();