/pidgin/main: 246fb7cd2d93: Smiley: add missing parent finalize ...

Tomasz Wasilczyk twasilczyk at pidgin.im
Thu Apr 10 15:57:33 EDT 2014


Changeset: 246fb7cd2d935466d531c97cf48af9a7fac56f48
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-04-10 21:57 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/246fb7cd2d93

Description:

Smiley: add missing parent finalize calls

diffstat:

 libpurple/smiley-list.c |  5 +++++
 libpurple/smiley.c      |  5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diffs (58 lines):

diff --git a/libpurple/smiley-list.c b/libpurple/smiley-list.c
--- a/libpurple/smiley-list.c
+++ b/libpurple/smiley-list.c
@@ -47,6 +47,7 @@ enum
 	PROP_LAST
 };
 
+static GObjectClass *parent_class;
 static GParamSpec *properties[PROP_LAST];
 
 static void
@@ -326,6 +327,8 @@ purple_smiley_list_finalize(GObject *obj
 	g_list_free(priv->smileys);
 
 	PURPLE_DBUS_UNREGISTER_POINTER(sl);
+
+	G_OBJECT_CLASS(parent_class)->finalize(obj);
 }
 
 static void
@@ -370,6 +373,8 @@ purple_smiley_list_class_init(PurpleSmil
 {
 	GObjectClass *gobj_class = G_OBJECT_CLASS(klass);
 
+	parent_class = g_type_class_peek_parent(klass);
+
 	g_type_class_add_private(klass, sizeof(PurpleSmileyListPrivate));
 
 	gobj_class->get_property = purple_smiley_list_get_property;
diff --git a/libpurple/smiley.c b/libpurple/smiley.c
--- a/libpurple/smiley.c
+++ b/libpurple/smiley.c
@@ -53,6 +53,7 @@ enum
 	SIG_LAST
 };
 
+static GObjectClass *parent_class;
 static guint signals[SIG_LAST];
 static GParamSpec *properties[PROP_LAST];
 
@@ -168,6 +169,8 @@ purple_smiley_finalize(GObject *obj)
 		purple_imgstore_unref(priv->image);
 
 	PURPLE_DBUS_UNREGISTER_POINTER(smiley);
+
+	G_OBJECT_CLASS(parent_class)->finalize(obj);
 }
 
 static void
@@ -224,6 +227,8 @@ purple_smiley_class_init(PurpleSmileyCla
 	GObjectClass *gobj_class = G_OBJECT_CLASS(klass);
 	PurpleSmileyClass *ps_class = PURPLE_SMILEY_CLASS(klass);
 
+	parent_class = g_type_class_peek_parent(klass);
+
 	g_type_class_add_private(klass, sizeof(PurpleSmileyPrivate));
 
 	gobj_class->get_property = purple_smiley_get_property;



More information about the Commits mailing list