diff options
author | rbuj <[email protected]> | 2021-11-28 13:19:58 +0100 |
---|---|---|
committer | Luke from DC <[email protected]> | 2021-12-16 06:52:11 +0000 |
commit | 6fbabd51619c92bcd8584e1bb2f12f2b52904ea6 (patch) | |
tree | 540229310cf7f6d6b60e82fcd2952a6caec31a4a /applets/clock/clock-face.c | |
parent | 94f3ec8c654363cd6a245eb9dca7c54f1b8f5649 (diff) | |
download | mate-panel-6fbabd51619c92bcd8584e1bb2f12f2b52904ea6.tar.bz2 mate-panel-6fbabd51619c92bcd8584e1bb2f12f2b52904ea6.tar.xz |
Use g_clear_pointer() and g_clear_object()
Diffstat (limited to 'applets/clock/clock-face.c')
-rw-r--r-- | applets/clock/clock-face.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/applets/clock/clock-face.c b/applets/clock/clock-face.c index a30afd13..7340c8a8 100644 --- a/applets/clock/clock-face.c +++ b/applets/clock/clock-face.c @@ -369,20 +369,9 @@ clock_face_finalize (GObject *obj) { ClockFacePrivate *priv = clock_face_get_instance_private (CLOCK_FACE(obj)); - if (priv->location) { - g_object_unref (priv->location); - priv->location = NULL; - } - - if (priv->face_pixbuf) { - g_object_unref (priv->face_pixbuf); - priv->face_pixbuf = NULL; - } - - if (priv->size_widget) { - g_object_unref (priv->size_widget); - priv->size_widget = NULL; - } + g_clear_object (&priv->location); + g_clear_object (&priv->face_pixbuf); + g_clear_object (&priv->size_widget); G_OBJECT_CLASS (clock_face_parent_class)->finalize (obj); |