summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index eab114b71ee7..e5218f415295 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -254,9 +254,12 @@ namespace
aTmpPam,
pMark->GetName(),
IDocumentMarkAccess::GetType(*pMark));
- // Explicitly try to get exactly the same name as in the source
- // because NavigatorReminders, DdeBookmarks etc. ignore the proposed name
- pDestDoc->getIDocumentMarkAccess()->renameMark(pNewMark, pMark->GetName());
+ if (pNewMark)
+ {
+ // Explicitly try to get exactly the same name as in the source
+ // because NavigatorReminders, DdeBookmarks etc. ignore the proposed name
+ pDestDoc->getIDocumentMarkAccess()->renameMark(pNewMark, pMark->GetName());
+ }
// copying additional attributes for bookmarks or fieldmarks
::sw::mark::IBookmark* const pNewBookmark =