From f3696aa8cb23fc853e298f9614768233f69f1298 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 17 Jun 2009 18:39:13 +0100 Subject: Don't add invalid presence type as favorite (#585053) --- libempathy-gtk/empathy-presence-chooser.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c index 27928aa0d..8fba26ff7 100644 --- a/libempathy-gtk/empathy-presence-chooser.c +++ b/libempathy-gtk/empathy-presence-chooser.c @@ -468,6 +468,10 @@ presence_chooser_entry_icon_release_cb (EmpathyPresenceChooser *self, state = empathy_idle_get_state (priv->idle); status = empathy_idle_get_status (priv->idle); + if (!empathy_status_presets_is_valid (state)) + /* It doesn't make sense to add such presence as favorite */ + return; + if (presence_chooser_is_preset (self)) { /* remove the entry */ DEBUG ("REMOVING PRESET (%i, %s)\n", state, status); -- cgit v1.2.3