[Libreoffice-commits] core.git: vcl/source

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 31 11:36:47 UTC 2020


 vcl/source/gdi/vectorgraphicdata.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f115a7e047e5f1b6067667adc50d60499cc3e27e
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Wed Aug 26 11:23:34 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Aug 31 13:33:10 2020 +0200

    tdf#136127: crash when adding protected PDF file on Photo Album
    
    See https://bugs.documentfoundation.org/attachment.cgi?id=164704
    
    Change-Id: I1c5713446f2af0a08873f0ea57afbfb34f9623be
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101393
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/vcl/source/gdi/vectorgraphicdata.cxx b/vcl/source/gdi/vectorgraphicdata.cxx
index ec02e9570191..bfaa544bc7d4 100644
--- a/vcl/source/gdi/vectorgraphicdata.cxx
+++ b/vcl/source/gdi/vectorgraphicdata.cxx
@@ -151,7 +151,8 @@ void VectorGraphicData::ensurePdfReplacement()
     if (mnPageIndex >= 0)
         nUsePageIndex = mnPageIndex;
     vcl::RenderPDFBitmaps(maVectorGraphicDataArray.getConstArray(), maVectorGraphicDataArray.getLength(), aBitmaps, nUsePageIndex, 1/*, fResolutionDPI*/);
-    maReplacement = aBitmaps[0];
+    if (!aBitmaps.empty())
+        maReplacement = aBitmaps[0];
 }
 
 void VectorGraphicData::ensureReplacement()


More information about the Libreoffice-commits mailing list