diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-05-17 10:34:24 +0100 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-05-17 10:50:26 +0100 |
commit | 7133b0e580815d6c25321bf213f5c61b75300e32 (patch) | |
tree | cf89b6cb87774d4d22021ef19c75c4eeab404653 | |
parent | c12764d3b42f40736f315c320b929f756405bf80 (diff) | |
download | telepathy-mission-control-7133b0e580815d6c25321bf213f5c61b75300e32.tar.gz |
service-points: don't depend on there being any interfaces
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r-- | src/mcd-connection-service-points.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mcd-connection-service-points.c b/src/mcd-connection-service-points.c index ae9cf6ce..b869f4c4 100644 --- a/src/mcd-connection-service-points.c +++ b/src/mcd-connection-service-points.c @@ -130,16 +130,20 @@ service_point_interface_check (TpConnection *tp_conn, gpointer data, GObject *connection) { - const gchar *interface = interfaces[0]; + const gchar *interface; gboolean found = FALSE; gboolean watch = GPOINTER_TO_UINT (data); guint i = 0; - while (!found && !tp_str_empty (interface)) + if (interfaces == NULL) + return; + + for (interface = interfaces[0]; + !found && !tp_str_empty (interface); + interface = interfaces[++i]) { if (!tp_strdiff (interface, TP_IFACE_CONNECTION_INTERFACE_SERVICE_POINT)) found = TRUE; - interface = interfaces[++i]; } if (!found) |