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/e-summary-weather.c | |
parent | 58573777e83d81da42285c576f95d588d27b224d (diff) | |
download | gsoc2013-evolution-29a63b4a136c2c1c7f824a333e4752987ee342b7.tar.gz 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/e-summary-weather.c')
-rw-r--r-- | my-evolution/e-summary-weather.c | 13 |
1 files changed, 10 insertions, 3 deletions
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); } |