[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sd/source

Caolán McNamara caolanm at redhat.com
Mon Oct 19 11:42:35 PDT 2015


 sd/source/ui/annotations/annotationmanager.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit c7f1f2274479fe926666dffe82fa322fe64a9f5c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 19 14:56:32 2015 +0100

    afl-eventtesting: deref of null GetMainViewShell
    
    (cherry picked from commit cbe2b9cb69a685ab89384f98a9e62b2623afcd9b)
    (cherry picked from commit 2b942719d7132b0e055395ad8efb0ee3c60676cf)
    
    Change-Id: Ie6863f446aa688bc1bb3f725ee31e9984dadc7a4
    Reviewed-on: https://gerrit.libreoffice.org/19466
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 36bf331..99451ab 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -1143,7 +1143,9 @@ SdPage* AnnotationManagerImpl::GetLastPage()
 
 SdPage* AnnotationManagerImpl::GetCurrentPage()
 {
-    return mrBase.GetMainViewShell()->getCurrentPage();
+    if (mrBase.GetMainViewShell().get())
+        return mrBase.GetMainViewShell()->getCurrentPage();
+    return nullptr;
 }
 
 AnnotationManager::AnnotationManager( ViewShellBase& rViewShellBase )


More information about the Libreoffice-commits mailing list