Commit f5c4b374 authored by Lars Hamann's avatar Lars Hamann Committed by Lars Hamann

call toggle_row with valid row numbers only (toggle_row): check if

Fri Dec  4 01:20:06 1998  Lars Hamann  <lars@gtk.org>

        * gtk/gtkclist.c (gtk_clist_button_release): call toggle_row with
        valid row numbers only
        (toggle_row): check if clist_row != NULL
parent f76880f2
Fri Dec 4 01:20:06 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_button_release): call toggle_row with
valid row numbers only
(toggle_row): check if clist_row != NULL
Fri Dec 4 00:50:12 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_export_to_gnode): fixed for-loop.
......
Fri Dec 4 01:20:06 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_button_release): call toggle_row with
valid row numbers only
(toggle_row): check if clist_row != NULL
Fri Dec 4 00:50:12 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_export_to_gnode): fixed for-loop.
......
Fri Dec 4 01:20:06 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_button_release): call toggle_row with
valid row numbers only
(toggle_row): check if clist_row != NULL
Fri Dec 4 00:50:12 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_export_to_gnode): fixed for-loop.
......
Fri Dec 4 01:20:06 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_button_release): call toggle_row with
valid row numbers only
(toggle_row): check if clist_row != NULL
Fri Dec 4 00:50:12 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_export_to_gnode): fixed for-loop.
......
Fri Dec 4 01:20:06 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_button_release): call toggle_row with
valid row numbers only
(toggle_row): check if clist_row != NULL
Fri Dec 4 00:50:12 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_export_to_gnode): fixed for-loop.
......
Fri Dec 4 01:20:06 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_button_release): call toggle_row with
valid row numbers only
(toggle_row): check if clist_row != NULL
Fri Dec 4 00:50:12 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_export_to_gnode): fixed for-loop.
......
Fri Dec 4 01:20:06 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_button_release): call toggle_row with
valid row numbers only
(toggle_row): check if clist_row != NULL
Fri Dec 4 00:50:12 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (gtk_ctree_export_to_gnode): fixed for-loop.
......
......@@ -3447,6 +3447,10 @@ toggle_row (GtkCList *clist,
case GTK_SELECTION_MULTIPLE:
case GTK_SELECTION_SINGLE:
clist_row = g_list_nth (clist->row_list, row)->data;
if (!clist_row)
return;
if (clist_row->state == GTK_STATE_SELECTED)
{
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[UNSELECT_ROW],
......@@ -3466,8 +3470,9 @@ fake_toggle_row (GtkCList *clist,
{
GList *work;
if (!(work = g_list_nth (clist->row_list, row))||
!GTK_CLIST_ROW (work)->selectable)
work = g_list_nth (clist->row_list, row);
if (!work || !GTK_CLIST_ROW (work)->selectable)
return;
if (GTK_CLIST_ROW (work)->state == GTK_STATE_NORMAL)
......@@ -5008,7 +5013,7 @@ gtk_clist_button_release (GtkWidget *widget,
case GTK_SELECTION_MULTIPLE:
if (get_selection_info (clist, event->x, event->y, &row, &column))
{
if (clist->anchor == clist->focus_row)
if (row >= 0 && row < clist->rows && clist->anchor == row)
toggle_row (clist, row, column, (GdkEvent *) event);
}
clist->anchor = -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment