summaryrefslogtreecommitdiffstats
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-28 09:42:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-28 11:29:20 +0000
commit6bdfbb1eac02708946c63fca3c4ef7e9062742c2 (patch)
tree140e2f24368b669923eeb0cac15a6bf94ff4f242 /vcl/unx
parentcoverity#440971 Dereference before null check (diff)
downloadcore-6bdfbb1eac02708946c63fca3c4ef7e9062742c2.tar.gz
core-6bdfbb1eac02708946c63fca3c4ef7e9062742c2.zip
coverity#440974 Dereference before null check
Change-Id: I680a2f9f53aaf9e45a0059173744afa9b6ef1d5a
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/window/salframe.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 5705a217e35a..2a4a8867dbe8 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -985,10 +985,12 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon )
for( int i = 0; i < nCount && !bGnomeIconSize; i++ )
{
char* pName = XGetAtomName( GetXDisplay(), pProps[i] );
- if( !strcmp( pName, "GNOME_PANEL_DESKTOP_AREA" ) )
- bGnomeIconSize = true;
if( pName )
+ {
+ if( !strcmp( pName, "GNOME_PANEL_DESKTOP_AREA" ) )
+ bGnomeIconSize = true;
XFree( pName );
+ }
}
if( pProps )
XFree( pProps );