summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-11-24 09:59:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2010-11-24 10:49:52 +0000
commitbc1e33d14745892d229c3c7a65c6546814e30057 (patch)
tree0105db2edf36a1f240ba4ef44076c50451959514
parentc9e79439bf99ee76be719283826b4106bb171bca (diff)
cppcheck: Possible null pointer dereference
-rw-r--r--sfx2/source/appl/shutdowniconunx.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index c28e73a543..e31c32f9d3 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() );