[MPlayer-cvslog] r36061 - trunk/gui/dialog/fileselect.c

ib subversion at mplayerhq.hu
Wed Mar 27 19:56:13 CET 2013


Author: ib
Date: Wed Mar 27 19:56:13 2013
New Revision: 36061

Log:
Fix crash with file selector after pressing OK.

The crash would occur with the "dot directory" selected and pressing OK
when previously either the "directory up" button or OK (to refresh the
file list) has been pressed.

Modified:
   trunk/gui/dialog/fileselect.c

Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Tue Mar 26 00:03:07 2013	(r36060)
+++ trunk/gui/dialog/fileselect.c	Wed Mar 27 19:56:13 2013	(r36061)
@@ -372,11 +372,11 @@ static void fs_Up_released( GtkButton * 
  gchar *utf8dir;
 
  chdir( ".." );
- fsSelectedFile=fsThatDir;
  CheckDir( fsFNameList );
  utf8dir = get_current_dir_name_utf8();
  gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),utf8dir );
  g_free(utf8dir);
+ fsSelectedFile=fsThatDir;
  return;
 }
 
@@ -391,12 +391,12 @@ static void fs_Ok_released( GtkButton * 
   {
    gchar *utf8dir;
    if ( chdir( fsSelectedFile ) != 0 ) return;
-   fsSelectedFile=fsThatDir;
    CheckDir( fsFNameList );
    utf8dir = get_current_dir_name_utf8();
    gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),utf8dir );
    g_free(utf8dir);
    gtk_widget_grab_focus( fsFNameList );
+   fsSelectedFile=fsThatDir;
    return;
   }
 


More information about the MPlayer-cvslog mailing list