From 12687af8e7e87e5c31a15df4b686ac89b58941e3 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 15 Apr 2010 17:19:56 +0200 Subject: protocol-chooser: return NULL if for some reason we can't find the procol any more This could eventually happen if a CM claims to support a protocol in its manager file but actually don't. Should fix #61582 --- libempathy-gtk/empathy-protocol-chooser.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libempathy-gtk/empathy-protocol-chooser.c') diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c index 72eb05536..9f57d921a 100644 --- a/libempathy-gtk/empathy-protocol-chooser.c +++ b/libempathy-gtk/empathy-protocol-chooser.c @@ -497,6 +497,14 @@ empathy_protocol_chooser_dup_selected ( tp_connection_manager_get_protocol (cm, protocol_name); g_free (protocol_name); + + if (*protocol == NULL) + { + /* For some reason the CM doesn't know about this protocol + * any more */ + g_object_unref (cm); + return NULL; + } } if (is_gtalk != NULL) -- cgit v1.2.3