]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Work around a bug in early versions of GTK (which I'm still forced
authorSimon Tatham <anakin@pobox.com>
Wed, 11 Jun 2008 18:03:35 +0000 (18:03 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 11 Jun 2008 18:03:35 +0000 (18:03 +0000)
to use, gah) in which the "model" argument to
gtk_tree_selection_get_selected_rows() couldn't be NULL.

[originally from svn r8069]

unix/gtkdlg.c

index 53a70259abd9b3a7440e0b4a5450eb19be69c8a5..d48a3162b63bd724e8c7974499db57e09e608a37 100644 (file)
@@ -701,6 +701,7 @@ int dlg_listbox_index(union control *ctrl, void *dlg)
     if (uc->treeview) {
        GtkTreeSelection *treesel;
        GtkTreePath *path;
+       GtkTreeModel *model;
        GList *sellist;
        gint *indices;
        int ret;
@@ -711,7 +712,7 @@ int dlg_listbox_index(union control *ctrl, void *dlg)
        if (gtk_tree_selection_count_selected_rows(treesel) != 1)
            return -1;
 
-       sellist = gtk_tree_selection_get_selected_rows(treesel, NULL);
+       sellist = gtk_tree_selection_get_selected_rows(treesel, &model);
 
        assert(sellist && sellist->data);
        path = sellist->data;