summaryrefslogtreecommitdiff
path: root/sd/source/ui/func
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-16 12:12:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-16 20:32:14 +0200
commit6254ff0fb034b1728df0da4f2986639d7fd0bd16 (patch)
tree12a05bfc1e7ed0717edd01cdecbe2a421ebaa7ee /sd/source/ui/func
parent8c46066fd383708dbb3137647048bd5d382a6ece (diff)
cid#1448514 Dereference null return value
Change-Id: Idf32f7a51a57756ac620249e5a95c9e1c8d2f9d2 Reviewed-on: https://gerrit.libreoffice.org/75716 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r--sd/source/ui/func/unoaprms.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sd/source/ui/func/unoaprms.cxx b/sd/source/ui/func/unoaprms.cxx
index 1a30565e0f76..3bf7d98a6113 100644
--- a/sd/source/ui/func/unoaprms.cxx
+++ b/sd/source/ui/func/unoaprms.cxx
@@ -28,10 +28,9 @@ void SdAnimationPrmsUndoAction::Undo()
if (!bInfoCreated)
{
SdDrawDocument* pDoc(dynamic_cast< SdDrawDocument* >(&pObject->getSdrModelFromSdrObject()));
- if( pDoc )
+ SdAnimationInfo* pInfo = pDoc ? SdDrawDocument::GetAnimationInfo(pObject) : nullptr;
+ if (pInfo)
{
- SdAnimationInfo* pInfo = SdDrawDocument::GetAnimationInfo( pObject );
-
pInfo->mbActive = bOldActive;
pInfo->meEffect = eOldEffect;
pInfo->meTextEffect = eOldTextEffect;