From bced3b294d21828265552fd3e3085bfce259fee6 Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Wed, 10 Oct 2007 16:32:33 +0000 Subject: [PATCH] * src/modest-ui-actions.c: * 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index f4522e9..13e4ee9 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -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")); -- 1.7.9.5