[empathy/gnome-2-30] protocol-chooser: return NULL if for some reason we can't find the procol any more
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy/gnome-2-30] protocol-chooser: return NULL if for some reason we can't find the procol any more
- Date: Thu, 15 Apr 2010 15:22:31 +0000 (UTC)
commit 328cdf4c7520b1526b1aac245791f1e97be2d3a5
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Thu Apr 15 17:19:56 2010 +0200
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 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c
index 72eb055..9f57d92 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]