[Telepathy-commits] [telepathy-gabble/master] GabbleMediaChannel: avoid initializing static data twice

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


20080526180112-53eee-26435cbae4173481b167aa17938239ead6eabddb.gz
---
 src/gabble-media-channel.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/gabble-media-channel.c b/src/gabble-media-channel.c
index a8ae25f..cf1aabe 100644
--- a/src/gabble-media-channel.c
+++ b/src/gabble-media-channel.c
@@ -586,7 +586,11 @@ gabble_media_channel_class_init (GabbleMediaChannelClass *gabble_media_channel_c
       channel_property_signatures, NUM_CHAN_PROPS, NULL);
 
   gabble_media_channel_class->dbus_props_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 (GabbleMediaChannelClass, dbus_props_class));
 }
-- 
1.5.6.3




More information about the Telepathy-commits mailing list