From fe700291eae05e801bc37a03fa3b882a6557d594 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Thu, 26 Jul 2001 21:00:21 +0000 Subject: check that the row passed in is valid. Sometimes we get the "row-selected" 2001-07-26 Damon Chaplin * gui/dialogs/recurrence-page.c (exception_select_row_cb): check that the row passed in is valid. Sometimes we get the "row-selected" signal for row 0 when there are no rows in the list. Fixes bug #4266. * cal-client/cal-client.c (cal_client_get_object): prefetch all the timezone data needed by the object, to try to avoid making Corba calls all over the place. They can cause problems because they call the GTK+ main loop recursively. This currently leads to an assertion failure in the GnomeCanvas occasionally. Though there are probably several other similar problems around. svn path=/trunk/; revision=11433 --- calendar/gui/dialogs/recurrence-page.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'calendar/gui/dialogs') diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index df3dd7e9cf..b60a9f6b48 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -2087,6 +2087,12 @@ exception_select_row_cb (GtkCList *clist, gint row, gint col, rpage = RECURRENCE_PAGE (data); priv = rpage->priv; + /* Sometimes GtkCList emits a 'row-selected' signal for row 0 when + there are 0 rows in the list (after you delete the last row). + So we check that the row is valid here. */ + if (row >= clist->rows) + return; + dt = gtk_clist_get_row_data (clist, row); g_assert (dt != NULL); -- cgit v1.2.3