summaryrefslogtreecommitdiff
path: root/src/Fl_Native_File_Chooser_GTK.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2014-06-19 17:02:36 +0000
committerManolo Gouy <Manolo>2014-06-19 17:02:36 +0000
commit703045f5b1cce4b9d4a6c62bfac7758b2ceef392 (patch)
tree4f86c02ad6188a01fa66e17b93954c889f3db810 /src/Fl_Native_File_Chooser_GTK.cxx
parentda5dff32ea54373e08772f230ac2c6edc8d7bdd5 (diff)
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
Diffstat (limited to 'src/Fl_Native_File_Chooser_GTK.cxx')
-rw-r--r--src/Fl_Native_File_Chooser_GTK.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Native_File_Chooser_GTK.cxx b/src/Fl_Native_File_Chooser_GTK.cxx
index 6464198ea..2386f3446 100644
--- a/src/Fl_Native_File_Chooser_GTK.cxx
+++ b/src/Fl_Native_File_Chooser_GTK.cxx
@@ -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();