aboutsummaryrefslogtreecommitdiffhomepage
path: root/Gui
diff options
context:
space:
mode:
authorGravatar pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-18 00:22:18 +0000
committerGravatar pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-18 00:22:18 +0000
commit190dceb619e2d2d460365eb23efd5cb5b00704d0 (patch)
tree9fdb361fff2f9ceb1c3ecef059c4001289cfdf31 /Gui
parent69267143f97328c367051a0d8d376c6112ed4948 (diff)
10l found by Arpi (njamd)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8978 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r--Gui/mplayer/gtk/sb.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/Gui/mplayer/gtk/sb.c b/Gui/mplayer/gtk/sb.c
index 3a712ce950..72809f5196 100644
--- a/Gui/mplayer/gtk/sb.c
+++ b/Gui/mplayer/gtk/sb.c
@@ -50,15 +50,10 @@ int gtkFillSkinList( gchar * mdir )
gtkOldSkin=strdup( skinName );
prev=gtkOldSkin;
- if ( ( str[0]=(char *)calloc( 1,7 ) ) == NULL )
- {
- gtkMessageBox( GTK_MB_FATAL,MSGTR_SKINBROWSER_NotEnoughMemory );
- return 0;
- }
+
+ str[0]="default";
str[1]="";
- strcpy( str[0],"default" );
if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
- free( str[0] );
glob( mdir,GLOB_NOSORT,NULL,&gg );
for( i=0;i<(int)gg.gl_pathc;i++ )
@@ -69,10 +64,8 @@ int gtkFillSkinList( gchar * mdir )
{
tmp=strrchr( gg.gl_pathv[i],'/' ); tmp++;
if ( !strcmp( tmp,"default" ) ) continue;
- if ( ( str[0]=(char *)malloc( strlen( tmp ) + 1 ) ) == NULL ) { gtkMessageBox( GTK_MB_FATAL,MSGTR_SKINBROWSER_NotEnoughMemory ); return 0; }
- strcpy( str[0],tmp );
+ str[0]=tmp;
if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
- free( str[0] );
}
}
globfree( &gg );