diff options
Diffstat (limited to 'applets/clock')
-rw-r--r-- | applets/clock/clock-location-tile.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c index b70f467c..4d0fc217 100644 --- a/applets/clock/clock-location-tile.c +++ b/applets/clock/clock-location-tile.c @@ -140,8 +140,16 @@ clock_location_tile_finalize (GObject *g_obj) priv = clock_location_tile_get_instance_private (this); if (priv->location) { - g_signal_handler_disconnect (priv->location, priv->location_weather_updated_id); - priv->location_weather_updated_id = 0; +#if GLIB_CHECK_VERSION(2,62,0) + g_clear_signal_handler (&priv->location_weather_updated_id, + priv->location); +#else + if (priv->location_weather_updated_id != 0) { + g_signal_handler_disconnect (priv->location, + priv->location_weather_updated_id); + priv->location_weather_updated_id = 0; + } +#endif g_clear_object (&priv->location); } |