summaryrefslogtreecommitdiff
path: root/sw
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:49:10 +0200
commit5387e8c8dc2484a6a30f0792e168c7621d1a5d50 (patch)
tree7fb9acfac0c387bb0aa2ca49fec0bd22682fbc6b /sw
parent0bffbac287aefd85aa1a2f31ea3fae925d3b35f3 (diff)
Don't crash when deleting a non-existing comment.
Change-Id: If03f19c988f4c7ba6dfe1d3058c71ec11cd1b732
Diffstat (limited to 'sw')
-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 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();