From 6afea9b226717688cb136ee4b1c00b0c6bb11e4e Mon Sep 17 00:00:00 2001 From: Philip Van Hoof Date: Mon, 3 Mar 2008 10:49:03 +0000 Subject: [PATCH] Bugfix for 81611 pmo-trunk-r4264 --- src/modest-ui-actions.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 48d8291..c478462 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -1205,7 +1205,10 @@ open_msgs_from_headers (TnyList *headers, ModestWindow *win) /* Get the account */ account = get_account_from_header_list (headers); - + + if (!account) + return; + /* Look if we already have a message view for each header. If true, then remove the header from the list of headers to open */ @@ -1528,8 +1531,10 @@ reply_forward (ReplyForwardAction action, ModestWindow *win) * whether he/she wants to download them. */ if (num_of_unc_msgs) { TnyAccount *account = get_account_from_header_list (header_list); - continue_download = connect_to_get_msg (win, num_of_unc_msgs, account); - g_object_unref (account); + if (account) { + continue_download = connect_to_get_msg (win, num_of_unc_msgs, account); + g_object_unref (account); + } } } @@ -3347,8 +3352,10 @@ modest_ui_actions_on_cut (GtkAction *action, if (num_of_unc_msgs) { TnyAccount *account = get_account_from_header_list (header_list); - continue_download = connect_to_get_msg (window, num_of_unc_msgs, account); - g_object_unref (account); + if (account) { + continue_download = connect_to_get_msg (window, num_of_unc_msgs, account); + g_object_unref (account); + } } if (num_of_unc_msgs == 0 || continue_download) { @@ -3408,8 +3415,10 @@ modest_ui_actions_on_copy (GtkAction *action, if (num_of_unc_msgs) { TnyAccount *account = get_account_from_header_list (header_list); - continue_download = connect_to_get_msg (window, num_of_unc_msgs, account); - g_object_unref (account); + if (account) { + continue_download = connect_to_get_msg (window, num_of_unc_msgs, account); + g_object_unref (account); + } } if (num_of_unc_msgs == 0 || continue_download) { -- 1.7.9.5