[MPlayer-cvslog] r35494 - trunk/gui/ui/gtk/skinbrowser.c

ib subversion at mplayerhq.hu
Wed Nov 28 12:57:52 CET 2012


Author: ib
Date: Wed Nov 28 12:57:52 2012
New Revision: 35494

Log:
Don't increment a pointer which might be null.

Modified:
   trunk/gui/ui/gtk/skinbrowser.c

Modified: trunk/gui/ui/gtk/skinbrowser.c
==============================================================================
--- trunk/gui/ui/gtk/skinbrowser.c	Wed Nov 28 12:40:52 2012	(r35493)
+++ trunk/gui/ui/gtk/skinbrowser.c	Wed Nov 28 12:57:52 2012	(r35494)
@@ -79,7 +79,9 @@ int gtkFillSkinList( gchar * mdir )
    if ( !strcmp( gg.gl_pathv[i],"." ) || !strcmp( gg.gl_pathv[i],".." ) ) continue;
    if ( ( stat( gg.gl_pathv[i],&fs ) == 0 ) && S_ISDIR( fs.st_mode ) )
     {
-     tmp=strrchr( gg.gl_pathv[i],'/' ); tmp++;
+     tmp=strrchr( gg.gl_pathv[i],'/' );
+     if (tmp) tmp++;
+     else tmp = gg.gl_pathv[i];
      if ( !strcmp( tmp,"default" ) ) continue;
      str[0]=tmp;
      if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );


More information about the MPlayer-cvslog mailing list