[Telepathy-commits] [telepathy-gabble/master] GabbleRosterChannel: avoid initializing static data twice if we're subclassed

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Aug 19 10:53:02 PDT 2008


20080526180141-53eee-9d2d3e789e0bd5008e166d0ba2260ff98c663fca.gz
---
 src/gabble-roster-channel.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/gabble-roster-channel.c b/src/gabble-roster-channel.c
index 4b4b23b..24defc7 100644
--- a/src/gabble-roster-channel.c
+++ b/src/gabble-roster-channel.c
@@ -300,7 +300,11 @@ gabble_roster_channel_class_init (GabbleRosterChannelClass *gabble_roster_channe
       _gabble_roster_channel_remove_member_cb);
 
   gabble_roster_channel_class->properties_class.interfaces = interfaces;
-  tp_group_mixin_init_dbus_properties (&(interfaces[0]));
+
+  /* only executed once */
+  if (interfaces[0].name == NULL)
+    tp_group_mixin_init_dbus_properties (&(interfaces[0]));
+
   tp_dbus_properties_mixin_class_init (object_class,
       G_STRUCT_OFFSET (GabbleRosterChannelClass, properties_class));
 }
-- 
1.5.6.3




More information about the Telepathy-commits mailing list