summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-19 14:56:32 +0100
committerAndras Timar <andras.timar@collabora.com>2015-10-26 16:04:02 +0100
commitdaba4852955278a22e750715e3341900d760895b (patch)
treefebd865403ffb82b92d56ae70870cb4ea4e1bc26 /sd
parent91dc727611a4d4ca2bde04b048d1e517159eab9c (diff)
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@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit c7f1f2274479fe926666dffe82fa322fe64a9f5c)
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 36bf3318ac21..99451ab8a625 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 )