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

Michael Meeks michael.meeks at suse.com
Fri Mar 8 03:03:41 PST 2013


 vcl/unx/generic/gdi/salgdi2.cxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 2e00860260815c075ce32de052dc7fa98021c95d
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Fri Mar 8 11:02:44 2013 +0000

    WaE: avoid mis-detection of uninitialized pixmap.

diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx
index 4684842..82c1e3b 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;


More information about the Libreoffice-commits mailing list