vcl/source/filter/png/PngImageWriter.cxx |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 5374b7107648757b572249777a5a00d4ad2eaac8
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Aug 13 14:23:38 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Aug 13 18:10:39 2023 +0200

    cid#1539910 avoid Missing move assignment operator
    
    and
    
    cid#1539912 Missing move assignment operator
    cid#1539913 Missing move assignment operator
    
    Change-Id: If46cb15c20479a4a88fdfa70fe4bb662004239d8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155645
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/source/filter/png/PngImageWriter.cxx 
b/vcl/source/filter/png/PngImageWriter.cxx
index 09bddf7b2f58..5d8f2c7372a8 100644
--- a/vcl/source/filter/png/PngImageWriter.cxx
+++ b/vcl/source/filter/png/PngImageWriter.cxx
@@ -126,12 +126,9 @@ static bool pngWrite(SvStream& rStream, const Graphic& 
rGraphic, int nCompressio
     if (rGraphic.IsNone())
         return false;
 
-    Animation aAnimation;
     sal_uInt32 nSequenceNumber = 0;
-    bool bIsApng = rGraphic.IsAnimated();
-
-    if (bIsApng)
-        aAnimation = rGraphic.GetAnimation();
+    const bool bIsApng = rGraphic.IsAnimated();
+    Animation aAnimation = bIsApng ? rGraphic.GetAnimation() : Animation();
 
     png_structp pPng = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, 
nullptr, nullptr);
 

Reply via email to