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

New commits:
commit f115a7e047e5f1b6067667adc50d60499cc3e27e
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Wed Aug 26 11:23:34 2020 +0200
Commit:     Tomaž Vajngerl <qui...@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 <qui...@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()
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to