summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuke Deller <luke@deller.id.au>2019-11-01 23:21:24 +1100
committerStephan Bergmann <sbergman@redhat.com>2019-11-01 18:25:07 +0100
commitc01e9df2da2e2ab139482563b8a801d0410357c2 (patch)
tree4dd3285f2159899ea99467ba1ea753a7cf04dd88 /vcl
parent60692ba238c6c5c003722ccaa52702e9ef3ade13 (diff)
Fix use of uninitialised variable
Ensure ImpGraphic::maSwapInfo.mbIsTransparent/mbIsAlpha are initialised in the case where image type detection fails. Change-Id: I103d77760326aa3833dd3730ec65fd53d360271b Reviewed-on: https://gerrit.libreoffice.org/81882 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/impgraph.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 17c371e6d77f..2fbd6795394c 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -570,6 +570,9 @@ void ImpGraphic::ImplSetPrepared(bool bAnimated, const Size* pSizeHint)
maSwapInfo.maSizePixel = aDescriptor.GetSizePixel();
maSwapInfo.mbIsTransparent = aDescriptor.IsTransparent();
maSwapInfo.mbIsAlpha = aDescriptor.IsAlpha();
+ } else {
+ maSwapInfo.mbIsTransparent = false;
+ maSwapInfo.mbIsAlpha = false;
}
maSwapInfo.mnAnimationLoopCount = 0;