modest_do_messages_delete (header_list, win);
/* Enable window dimming management */
- gtk_tree_selection_unselect_all (sel);
+ if (sel != NULL) {
+ gtk_tree_selection_unselect_all (sel);
+ }
modest_window_enable_dimming (MODEST_WINDOW(win));
if (MODEST_IS_MSG_VIEW_WINDOW (win)) {
g_return_if_fail (MODEST_IS_MAIN_WINDOW (user_data));
win = MODEST_MAIN_WINDOW (user_data);
+ /* Don't do anything if there are not new headers, this could
+ happen if there was any problem with the mail operation */
+ if (!new_headers)
+ return;
+
/* Set contents style of headers view */
if (modest_main_window_get_contents_style (win) == MODEST_MAIN_WINDOW_CONTENTS_STYLE_EMPTY) {
folder_view = modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (win),
}
/* Notify new messages have been downloaded */
- if (tny_list_get_length (new_headers) > 0) {
+ if ((new_headers != NULL) && (tny_list_get_length (new_headers) > 0)) {
TnyIterator *iter = tny_list_create_iterator (new_headers);
do {
TnyHeader *header = NULL;
should show the Accounts Settings dialog or the Connection
specific SMTP server window */
- modest_maemo_show_information_note_and_forget (NULL, message);
+ modest_platform_run_information_dialog (NULL, message);
g_free (message);
}