summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-08-26 11:23:34 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-08-31 13:33:10 +0200
commitf115a7e047e5f1b6067667adc50d60499cc3e27e (patch)
treed5078bb845593ce493234f53313b3de922ab570e /vcl
parentdb5f204b1d3d96975d902b587d6d18bc06610eea (diff)
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@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/vectorgraphicdata.cxx3
1 files changed, 2 insertions, 1 deletions
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()