[evolution-data-server/gnome-3-34] EWeatherSource: Use g_signal_connect_object() in e_weather_source_parse()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-34] EWeatherSource: Use g_signal_connect_object() in e_weather_source_parse()
- Date: Mon, 14 Oct 2019 17:00:31 +0000 (UTC)
commit 392127bc40e32c95a0ea1923e3e69d9d168cca04
Author: Milan Crha <mcrha redhat com>
Date: Mon Oct 14 18:58:09 2019 +0200
EWeatherSource: Use g_signal_connect_object() in e_weather_source_parse()
Just in case the GWeatherInfo object is freed after the EWeatherSource
is freed, thus the callback is not called on an already freed EWeatherSource.
src/calendar/backends/weather/e-weather-source.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/calendar/backends/weather/e-weather-source.c
b/src/calendar/backends/weather/e-weather-source.c
index 8aada0196..183edd86e 100644
--- a/src/calendar/backends/weather/e-weather-source.c
+++ b/src/calendar/backends/weather/e-weather-source.c
@@ -193,9 +193,9 @@ e_weather_source_parse (EWeatherSource *source,
#endif
);
gweather_info_set_enabled_providers (source->priv->info, GWEATHER_PROVIDER_ALL);
- g_signal_connect (
+ g_signal_connect_object (
source->priv->info, "updated",
- G_CALLBACK (weather_source_updated_cb), source);
+ G_CALLBACK (weather_source_updated_cb), source, 0);
}
gweather_info_update (source->priv->info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]