[totem] backend: Use g_clear_* in the OSD widget
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Use g_clear_* in the OSD widget
- Date: Thu, 4 Apr 2013 07:14:19 +0000 (UTC)
commit 061a4eeaf30337c4034f2e6f78802f7b08cfac4b
Author: Bastien Nocera <hadess hadess net>
Date: Thu Mar 28 11:40:16 2013 +0100
backend: Use g_clear_* in the OSD widget
src/backend/bacon-video-osd-actor.c | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/src/backend/bacon-video-osd-actor.c b/src/backend/bacon-video-osd-actor.c
index 0a88dcd..b557ed3 100644
--- a/src/backend/bacon-video-osd-actor.c
+++ b/src/backend/bacon-video-osd-actor.c
@@ -109,17 +109,9 @@ bacon_video_osd_actor_finalize (GObject *object)
BaconVideoOsdActor *osd;
osd = BACON_VIDEO_OSD_ACTOR (object);
- if (osd->priv->ctx) {
- g_free (osd->priv->ctx);
- osd->priv->ctx = NULL;
- }
- if (osd->priv->style) {
- g_object_unref (osd->priv->style);
- osd->priv->style = NULL;
- }
-
- g_free (osd->priv->icon_name);
- osd->priv->icon_name = NULL;
+ g_clear_pointer (&osd->priv->ctx, g_free);
+ g_clear_object (&osd->priv->style);
+ g_clear_pointer (&osd->priv->icon_name, g_free);
G_OBJECT_CLASS (bacon_video_osd_actor_parent_class)->finalize (object);
}
@@ -129,7 +121,6 @@ bacon_video_osd_actor_class_init (BaconVideoOsdActorClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-// gobject_class->constructor = bacon_video_osd_actor_constructor;
gobject_class->finalize = bacon_video_osd_actor_finalize;
g_type_class_add_private (klass, sizeof (BaconVideoOsdActorPrivate));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]