[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Fri Jun 10 13:59:52 UTC 2016


 sw/source/core/doc/DocumentContentOperationsManager.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 5c1a1d1c66aff497702abc20df5832fa348f1008
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 10 14:56:54 2016 +0100

    Resolves: tdf#100275 makeMark may return null under some circumstances
    
    Change-Id: If3b83413c028c6cd1c055e632b6f050ec7f2475d

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index eab114b..e5218f4 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 =


More information about the Libreoffice-commits mailing list