[Libreoffice-commits] .: 2 commits - sfx2/source

Caolán McNamara caolan at kemper.freedesktop.org
Wed Nov 24 02:52:44 PST 2010


 sfx2/source/appl/shutdowniconunx.cxx |    3 ++-
 sfx2/source/doc/docvor.cxx           |   12 ------------
 2 files changed, 2 insertions(+), 13 deletions(-)

New commits:
commit bc1e33d14745892d229c3c7a65c6546814e30057
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 24 09:59:59 2010 +0000

    cppcheck: Possible null pointer dereference

diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index c28e73a..e31c32f 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -94,7 +94,8 @@ static GdkPixbuf * ResIdToPixbuf( USHORT nResId )
     g_return_val_if_fail( pSalBitmap != NULL, NULL );
 
     Size aSize( pSalBitmap->Width(), pSalBitmap->Height() );
-    g_return_val_if_fail( Size( pSalAlpha->Width(), pSalAlpha->Height() ) == aSize, NULL );
+    if (pSalAlpha)
+        g_return_val_if_fail( Size( pSalAlpha->Width(), pSalAlpha->Height() ) == aSize, NULL );
 
     int nX, nY;
     guchar *pPixbufData = ( guchar * )g_malloc( 4 * aSize.Width() * aSize.Height() );
commit c9e79439bf99ee76be719283826b4106bb171bca
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 24 09:03:52 2010 +0000

    cppcheck: Unused private function

diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index fe22072..918f2fe 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -414,7 +414,6 @@ ImpPath_Impl::ImpPath_Impl( const ImpPath_Impl& rCopy ) :
 class Path
 {
     ImpPath_Impl *pData;
-    void NewImp();
 public:
     Path(SvLBox *pBox, SvLBoxEntry *pEntry);
     Path(const Path &rPath):
@@ -465,17 +464,6 @@ Path::Path(SvLBox *pBox, SvLBoxEntry *pEntry) :
 
 //-------------------------------------------------------------------------
 
-void Path::NewImp()
-{
-    if(pData->nRef != 1)
-    {
-        pData->nRef--;
-        pData = new ImpPath_Impl(*pData);
-    }
-}
-
-//-------------------------------------------------------------------------
-
 SvLBoxEntry *GetIndices_Impl(SvLBox *pBox,
                                SvLBoxEntry *pEntry,
                                USHORT &rRegion,


More information about the Libreoffice-commits mailing list