* src/modest-ui-actions.c:
authorJose Dapena Paz <jdapena@igalia.com>
Wed, 10 Oct 2007 16:32:33 +0000 (16:32 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Wed, 10 Oct 2007 16:32:33 +0000 (16:32 +0000)
        * Now we don't crash if we open a message from drafts without an
          account to edit (fixes NB#65064).

pmo-trunk-r3485

src/modest-ui-actions.c

index f4522e9..13e4ee9 100644 (file)
@@ -1168,7 +1168,11 @@ _modest_ui_actions_open (TnyList *headers, ModestWindow *win)
 
                /* Get the error message depending on the protocol */
                proto_name = tny_account_get_proto (account);
-               proto = modest_protocol_info_get_transport_store_protocol (proto_name);
+               if (proto_name != NULL) {
+                       proto = modest_protocol_info_get_transport_store_protocol (proto_name);
+               } else {
+                       proto = MODEST_PROTOCOL_STORE_MAILDIR;
+               }
                
                if (proto == MODEST_PROTOCOL_STORE_POP) {
                        error_msg = g_strdup (_("emev_ni_ui_pop3_msg_recv_error"));