From cc6c2b5423c3a1906b5f484c157bc67dd9ee9d86 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 1 Jun 2011 11:33:04 +0200 Subject: empathy_individual_view_get_individual_menu: don't create a menu if we don't want any feature Fix an assertion error when right clicking in the 'Invite contact' treeview. --- libempathy-gtk/empathy-individual-view.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c index ec632989e..72e64cf7d 100644 --- a/libempathy-gtk/empathy-individual-view.c +++ b/libempathy-gtk/empathy-individual-view.c @@ -2564,6 +2564,10 @@ empathy_individual_view_get_individual_menu (EmpathyIndividualView *view) g_return_val_if_fail (EMPATHY_IS_INDIVIDUAL_VIEW (view), NULL); + if (priv->individual_features == EMPATHY_INDIVIDUAL_FEATURE_NONE) + /* No need to create a context menu */ + return NULL; + individual = empathy_individual_view_dup_selected (view); if (individual == NULL) return NULL; -- cgit v1.2.3