vcl/source/gdi/impgraph.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f887c9beee0da27acec3abf683d8031b2385ff5f
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Aug 31 12:38:00 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Aug 31 22:23:16 2022 +0200

    cid#1500610 Explicit null dereferenced
    
    Change-Id: I4b63822212c8445007435be6bbc67b6b2c64bbb5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139111
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index b790b4d40c14..31980b1d1beb 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -842,7 +842,7 @@ void ImpGraphic::setValuesForPrefSize(const Size& rPrefSize)
 
             // #108077# Push through pref size to animation object,
             // will be lost on copy otherwise
-            if (isAnimated())
+            if (mpAnimation)
             {
                 const_cast< BitmapEx& 
>(mpAnimation->GetBitmapEx()).SetPrefSize(rPrefSize);
             }
@@ -932,7 +932,7 @@ void ImpGraphic::setValuesForPrefMapMod(const MapMode& 
rPrefMapMode)
             {
                 // #108077# Push through pref mapmode to animation object,
                 // will be lost on copy otherwise
-                if (isAnimated())
+                if (mpAnimation)
                 {
                     
const_cast<BitmapEx&>(mpAnimation->GetBitmapEx()).SetPrefMapMode(rPrefMapMode);
                 }
@@ -1235,7 +1235,7 @@ bool ImpGraphic::swapOutGraphic(SvStream& rStream)
                     maVectorGraphicData->getBinaryDataContainer().getData(),
                     maVectorGraphicData->getBinaryDataContainer().getSize());
             }
-            else if (isAnimated())
+            else if (mpAnimation)
             {
                 rStream.WriteInt32(sal_Int32(GraphicContentType::Animation));
                 WriteAnimation(rStream, *mpAnimation);

Reply via email to