summaryrefslogtreecommitdiff
path: root/applets/clock/clock-location-tile.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-11-28 13:19:58 +0100
committerLuke from DC <[email protected]>2021-12-16 06:52:11 +0000
commit6fbabd51619c92bcd8584e1bb2f12f2b52904ea6 (patch)
tree540229310cf7f6d6b60e82fcd2952a6caec31a4a /applets/clock/clock-location-tile.c
parent94f3ec8c654363cd6a245eb9dca7c54f1b8f5649 (diff)
downloadmate-panel-6fbabd51619c92bcd8584e1bb2f12f2b52904ea6.tar.bz2
mate-panel-6fbabd51619c92bcd8584e1bb2f12f2b52904ea6.tar.xz
Use g_clear_pointer() and g_clear_object()
Diffstat (limited to 'applets/clock/clock-location-tile.c')
-rw-r--r--applets/clock/clock-location-tile.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c
index 55bc749a..b70f467c 100644
--- a/applets/clock/clock-location-tile.c
+++ b/applets/clock/clock-location-tile.c
@@ -143,19 +143,11 @@ clock_location_tile_finalize (GObject *g_obj)
g_signal_handler_disconnect (priv->location, priv->location_weather_updated_id);
priv->location_weather_updated_id = 0;
- g_object_unref (priv->location);
- priv->location = NULL;
+ g_clear_object (&priv->location);
}
- if (priv->button_group) {
- g_object_unref (priv->button_group);
- priv->button_group = NULL;
- }
-
- if (priv->current_group) {
- g_object_unref (priv->current_group);
- priv->current_group = NULL;
- }
+ g_clear_object (&priv->button_group);
+ g_clear_object (&priv->current_group);
G_OBJECT_CLASS (clock_location_tile_parent_class)->finalize (g_obj);
}