aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-09 22:20:23 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-16 18:31:36 +0800
commit20772a7c205e54e4b5f28d14e279691459efaf1a (patch)
treed08cbd3120883d790d2b8f8fea045ca9ae7253cb /libempathy-gtk
parent9882c0f0f7d25d6bc6d6490df427c9ee6acc7f08 (diff)
downloadgsoc2013-empathy-20772a7c205e54e4b5f28d14e279691459efaf1a.tar
gsoc2013-empathy-20772a7c205e54e4b5f28d14e279691459efaf1a.tar.gz
gsoc2013-empathy-20772a7c205e54e4b5f28d14e279691459efaf1a.tar.bz2
gsoc2013-empathy-20772a7c205e54e4b5f28d14e279691459efaf1a.tar.lz
gsoc2013-empathy-20772a7c205e54e4b5f28d14e279691459efaf1a.tar.xz
gsoc2013-empathy-20772a7c205e54e4b5f28d14e279691459efaf1a.tar.zst
gsoc2013-empathy-20772a7c205e54e4b5f28d14e279691459efaf1a.zip
individual-view: don't display menu if empathy_folks_individual_contains_contact() fails
The individual menu already asserts that's the case. And there is no point displaying a menu anyway. https://bugzilla.gnome.org/show_bug.cgi?id=663763
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-individual-view.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 547af24f8..440680b20 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -2627,6 +2627,9 @@ empathy_individual_view_get_individual_menu (EmpathyIndividualView *view)
if (individual == NULL)
return NULL;
+ if (!empathy_folks_individual_contains_contact (individual))
+ goto out;
+
/* If any of the Individual's personas can be removed, add an option to
* remove. This will act as a best-effort option. If any Personas cannot be
* removed from the server, then this option will just be inactive upon
@@ -2681,6 +2684,7 @@ empathy_individual_view_get_individual_menu (EmpathyIndividualView *view)
g_signal_connect (menu, "link-contacts-activated",
(GCallback) individual_menu_link_contacts_activated_cb, view);
+out:
g_object_unref (individual);
return menu;