ModestToolBarModes mode;
GSList *tmp;
gboolean mode_changed = FALSE;
- TnyAccount *account;
+ TnyAccount *account = NULL;
self = MODEST_MAIN_WINDOW (user_data);
priv = MODEST_MAIN_WINDOW_GET_PRIVATE (self);
priv->retrieving_banner_timeout =
g_timeout_add (2000, show_retrieving_banner, self);
}
- g_object_unref (account);
+
+ /* Not every mail operation has account, noop does not */
+ if (account)
+ g_object_unref (account);
/* Get toolbar mode from operation id*/
mode = get_toolbar_mode_from_mail_operation (self, mail_op, &mode_changed);
GSList *tmp = NULL;
ModestMainWindow *self;
gboolean mode_changed;
- TnyAccount *account;
+ TnyAccount *account = NULL;
ModestMainWindowPrivate *priv;
self = MODEST_MAIN_WINDOW (user_data);
priv->retrieving_banner = NULL;
}
}
- g_object_unref (account);
+
+ /* Not every mail operation has account, noop does not */
+ if (account)
+ g_object_unref (account);
/* Get toolbar mode from operation id*/
mode = get_toolbar_mode_from_mail_operation (self, mail_op, &mode_changed);
/* If account_name == NULL, we must update all (option All) */
if (!account_name)
- modest_ui_actions_do_send_receive_all (win, TRUE, TRUE);
+ modest_ui_actions_do_send_receive_all (win, TRUE, TRUE, TRUE);
else
- modest_ui_actions_do_send_receive (account_name, TRUE, TRUE, win);
+ modest_ui_actions_do_send_receive (account_name, TRUE, TRUE, TRUE, win);
}