diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-03-08 11:02:44 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-03-08 11:02:44 +0000 |
commit | 2e00860260815c075ce32de052dc7fa98021c95d (patch) | |
tree | 6437c8838be03a4eba69da698084436cc0d93549 /vcl | |
parent | d400bb0d33acd81226fbeea56eaa9ae02a8b1c05 (diff) |
WaE: avoid mis-detection of uninitialized pixmap.
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/gdi/salgdi2.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx index 468484284069..82c1e3b68035 100644 --- a/vcl/unx/generic/gdi/salgdi2.cxx +++ b/vcl/unx/generic/gdi/salgdi2.cxx @@ -658,8 +658,8 @@ bool X11SalGraphics::drawAlphaBitmapOpt( const SalTwoRect& rTR, const SalVisual& rSalVis = pSalDisp->GetVisual( m_nXScreen ); Display* pXDisplay = pSalDisp->GetDisplay(); - Picture aAlphaPic; - Pixmap aAlphaPM; + Picture aAlphaPic = 0; + Pixmap aAlphaPM = 0; // create source Picture int nDepth = m_pVDev ? m_pVDev->GetDepth() : rSalVis.GetDepth(); const X11SalBitmap& rSrcX11Bmp = static_cast<const X11SalBitmap&>( rSrcBitmap ); @@ -759,8 +759,10 @@ bool X11SalGraphics::drawAlphaBitmapOpt( const SalTwoRect& rTR, if ( bUseAlphaBitmap ) { - rPeer.FreePicture( aAlphaPic ); - XFreePixmap( pXDisplay, aAlphaPM); + if ( aAlphaPic ) + rPeer.FreePicture( aAlphaPic ); + if ( aAlphaPM ) + XFreePixmap( pXDisplay, aAlphaPM ); } rPeer.FreePicture( aSrcPic ); return true; |