summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-03-02 12:37:17 +0300
committerXisco Faulí <xiscofauli@libreoffice.org>2020-03-03 08:52:17 +0100
commit8ebb41ba032ac341f1b0e8fcfe79581488ef75bd (patch)
tree5d331df3802386284878fb1e2a3b77ec3bb6c51f /sd/source
parentb221b09739616a3776800b9784f82ec6b747a0dc (diff)
tdf#118893: avoid nullptr dereference
Change-Id: I56ada18348ed1b1ebe5e1d6f000391965d822b4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89815 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 788ffc0360e44c54947bdead6d1eb368e5283915) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89798 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/app/sdxfer.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index a48721c3f888..c1c112008b05 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -243,7 +243,7 @@ void SdTransferable::CreateData()
SdPage* pPage = mpSdDrawDocument->GetSdPage(0, PageKind::Standard);
- if( 1 == pPage->GetObjCount() )
+ if( pPage && 1 == pPage->GetObjCount() )
CreateObjectReplacement( pPage->GetObj( 0 ) );
mpVDev = VclPtr<VirtualDevice>::Create( *Application::GetDefaultDevice() );