store_account = modest_tny_account_store_get_server_account (modest_runtime_get_account_store (),
account_name,
TNY_ACCOUNT_TYPE_STORE);
-
- /* Reconnect the store account, no need to reconnect the
- transport account because it will connect when needed */
- if (tny_account_get_connection_status (store_account) ==
- TNY_CONNECTION_STATUS_DISCONNECTED)
- tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (store_account),
- TRUE, NULL, NULL);
-
+ if (store_account) {
+ /* Reconnect the store account, no need to reconnect the
+ transport account because it will connect when needed */
+ if (tny_account_get_connection_status (store_account) ==
+ TNY_CONNECTION_STATUS_DISCONNECTED)
+ tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (store_account),
+ TRUE, NULL, NULL);
+ g_object_unref (store_account);
+ }
/* Disconnect this handler */
g_signal_handlers_disconnect_by_func (dialog, on_account_settings_dialog_response, user_data);
/* Free */
g_free (account_name);
- g_object_unref (store_account);
}
static void
g_return_if_fail (MODEST_IS_MSG_VIEW_WINDOW (self));
priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (self);
- header = modest_msg_view_window_get_header (MODEST_MSG_VIEW_WINDOW (self));
+ header = modest_msg_view_window_get_header (MODEST_MSG_VIEW_WINDOW (self));
- if (!message_reader (self, priv, header, NULL, NULL, priv->row_reference)) {
- g_warning ("Shouldn't happen, trying to reload a message failed");
- }
+ if (header) {
+ if (!message_reader (self, priv, header, NULL, NULL, priv->row_reference))
+ g_warning ("Shouldn't happen, trying to reload a message failed");
- g_object_unref (header);
+ g_object_unref (header);
+ }
}
static void
if (!callback_called)
modest_mail_operation_notify_end (info->mailop);
- g_object_unref(info->mailop);
+ if (info->mailop)
+ g_object_unref(info->mailop);
g_slice_free (SaveToDraftsAddMsgInfo, info);
}
priv->selected = NULL;
gtk_container_foreach (GTK_CONTAINER (priv->box), (GtkCallback) gtk_widget_destroy, NULL);
-
- if (priv->msg == NULL) {
+
+ if (priv->msg == NULL)
return;
- }
part_to_check = modest_tny_msg_get_attachments_parent (TNY_MSG (msg));
-
- if (part_to_check) {
- msg_content_type = modest_tny_mime_part_get_content_type (TNY_MIME_PART (part_to_check));
- is_alternate = !strcasecmp (msg_content_type, "multipart/alternative");
- } else {
- /* If we couldn't find parent, just go through fallback */
- msg_content_type = NULL;
- is_alternate = FALSE;
- }
+ msg_content_type = modest_tny_mime_part_get_content_type (TNY_MIME_PART (part_to_check));
+ is_alternate = !strcasecmp (msg_content_type, "multipart/alternative");
/* If the top mime part is a multipart/related, we don't show the attachments, as they're
* embedded images in body */
g_free (msg_content_type);
header_content_type = modest_tny_mime_part_get_headers_content_type (TNY_MIME_PART (part_to_check));
-
+
if ((header_content_type != NULL) &&
!strstr (header_content_type, "application/")) {
application_multipart = TRUE;
g_object_unref (iter);
g_object_unref (parts);
g_object_unref (part_to_check);
-
gtk_widget_queue_draw (GTK_WIDGET (attachments_view));