diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-10-21 23:21:10 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-10-21 23:21:10 +0800 |
commit | 29a63b4a136c2c1c7f824a333e4752987ee342b7 (patch) | |
tree | 4d971389a3ce2e4580ee2941ca9e09c81e35a12e /my-evolution | |
parent | 58573777e83d81da42285c576f95d588d27b224d (diff) | |
download | gsoc2013-evolution-29a63b4a136c2c1c7f824a333e4752987ee342b7.tar gsoc2013-evolution-29a63b4a136c2c1c7f824a333e4752987ee342b7.tar.gz gsoc2013-evolution-29a63b4a136c2c1c7f824a333e4752987ee342b7.tar.bz2 gsoc2013-evolution-29a63b4a136c2c1c7f824a333e4752987ee342b7.tar.lz gsoc2013-evolution-29a63b4a136c2c1c7f824a333e4752987ee342b7.tar.xz gsoc2013-evolution-29a63b4a136c2c1c7f824a333e4752987ee342b7.tar.zst gsoc2013-evolution-29a63b4a136c2c1c7f824a333e4752987ee342b7.zip |
(e_summary_weather_reconfigure): NULL the
->weathers member before freeing the list items. Otherwise
soup_message_cancel() might invoke the refresh function while we
are freeing things on the list, and crash. [#31639]
svn path=/trunk/; revision=18398
Diffstat (limited to 'my-evolution')
-rw-r--r-- | my-evolution/ChangeLog | 7 | ||||
-rw-r--r-- | my-evolution/e-summary-weather.c | 13 |
2 files changed, 17 insertions, 3 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index d35630efd3..7079382892 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,10 @@ +2002-10-21 Ettore Perazzoli <ettore@ximian.com> + + * e-summary-weather.c (e_summary_weather_reconfigure): NULL the + ->weathers member before freeing the list items. Otherwise + soup_message_cancel() might invoke the refresh function while we + are freeing things on the list, and crash. [#31639] + 2002-09-26 Ettore Perazzoli <ettore@ximian.com> * e-summary-mail.c (e_summary_mail_generate_html): Generate HTML diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c index 6391fa7c3e..667853a8b0 100644 --- a/my-evolution/e-summary-weather.c +++ b/my-evolution/e-summary-weather.c @@ -759,6 +759,7 @@ e_summary_weather_reconfigure (ESummary *summary) { ESummaryWeather *weather; GList *old, *p; + GList *weather_list; g_return_if_fail (summary != NULL); g_return_if_fail (IS_E_SUMMARY (summary)); @@ -768,14 +769,20 @@ e_summary_weather_reconfigure (ESummary *summary) /* Stop timeout so it doesn't occur while we're changing stuff*/ gtk_timeout_remove (weather->timeout); - for (old = weather->weathers; old; old = old->next) { + /* Clear the weather list before doing weather_free() on each of them + because otherwise soup_message_cancel() could invoke the refresh + function just while we are freeing things. [#31639] */ + weather_list = weather->weathers; + weather->weathers = NULL; + + for (old = weather_list; old != NULL; old = old->next) { Weather *w; w = old->data; weather_free (w); } - g_list_free (weather->weathers); - weather->weathers = NULL; + g_list_free (weather_list); + for (p = summary->preferences->stations; p; p = p->next) { e_summary_weather_add_location (summary, p->data); } |