aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 87c7b3e506..4ffc4e4c78 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -1696,9 +1696,11 @@ invert_selection (BonoboUIComponent *uih, void *user_data, const char *path)
if (FOLDER_BROWSER_IS_DESTROYED (fb))
return;
- etsm = e_tree_get_selection_model (fb->message_list->tree);
-
- e_selection_model_invert_selection (etsm);
+ if (GTK_WIDGET_HAS_FOCUS (fb->message_list)) {
+ etsm = e_tree_get_selection_model (fb->message_list->tree);
+
+ e_selection_model_invert_selection (etsm);
+ }
}
/* flag all selected messages. Return number flagged */