diff options
author | Chenthill Palanisamy <pchenthill@novell.com> | 2005-03-18 20:39:37 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-03-18 20:39:37 +0800 |
commit | 66296dadd3be43341d9991097f972aedd525ea06 (patch) | |
tree | 5e79bc3cc8786e402bec8556f9c5947825ed1478 /calendar | |
parent | 6c0fc1d201c48d0933c2114697463912126fcd75 (diff) | |
download | gsoc2013-evolution-66296dadd3be43341d9991097f972aedd525ea06.tar.gz gsoc2013-evolution-66296dadd3be43341d9991097f972aedd525ea06.tar.zst gsoc2013-evolution-66296dadd3be43341d9991097f972aedd525ea06.zip |
Fixes #68525, 68580 Added a boolean variable to avoid crash when a race
2005-03-17 Chenthill Palanisamy <pchenthill@novell.com>
Fixes #68525, 68580
* gui/gnome-cal.c (update_query), (gnome_calendar_init):
Added a boolean variable to avoid crash when a race condition
occurs.
svn path=/trunk/; revision=29062
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index f8dc0628e8..191738287b 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2005-03-17 Chenthill Palanisamy <pchenthill@novell.com> + + Fixes #68525, 68580 + * gui/gnome-cal.c (update_query), (gnome_calendar_init): + Added a boolean variable to avoid crash when a race condition + occurs. + 2005-03-16 Rodrigo Moya <rodrigo@novell.com> Fixes #73101 diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 3a85a4a89f..5c8d6e0ad1 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -175,6 +175,7 @@ struct _GnomeCalendarPrivate { 'dates-shown-changed' signal.*/ time_t visible_start; time_t visible_end; + gboolean updating; }; /* Signal IDs */ @@ -715,9 +716,13 @@ update_query (GnomeCalendar *gcal) priv = gcal->priv; + if (priv->updating == TRUE) { + return; + } e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), _("Updating query")); e_calendar_item_clear_marks (priv->date_navigator->calitem); + priv->updating = TRUE; /* free the previous queries */ for (l = priv->dn_queries; l != NULL; l = l->next) { old_query = l->data; @@ -737,6 +742,7 @@ update_query (GnomeCalendar *gcal) real_sexp = adjust_e_cal_view_sexp (gcal, priv->sexp); if (!real_sexp) { e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL); + priv->updating = FALSE; return; /* No time range is set, so don't start a query */ } @@ -768,6 +774,7 @@ update_query (GnomeCalendar *gcal) } /* free memory */ + priv->updating = FALSE; g_free (real_sexp); e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL); update_todo_view (gcal); @@ -1412,6 +1419,7 @@ gnome_calendar_init (GnomeCalendar *gcal) priv->visible_start = -1; priv->visible_end = -1; + priv->updating = FALSE; } static void |