Fixed a possible crash of the GTK file chooser.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10201 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2014-06-19 17:02:36 +00:00
parent da5dff32ea
commit 703045f5b1
1 changed files with 1 additions and 1 deletions

View File

@ -497,7 +497,7 @@ int Fl_GTK_File_Chooser::fl_gtk_chooser_wrapper()
count++;
}
free(filter);
fl_gtk_file_chooser_set_filter((GtkFileChooser *)gtkw_ptr, filter_tab[_filtvalue]);
fl_gtk_file_chooser_set_filter((GtkFileChooser *)gtkw_ptr, filter_tab[_filtvalue < _nfilters?_filtvalue:0]);
previous_filter = NULL;
if (gtw_action_type == GTK_FILE_CHOOSER_ACTION_OPEN) {
GtkFileFilter* gfilter = fl_gtk_file_filter_new();