From 465af7a0332b1b77bf150054a33deb5dbdaf7da3 Mon Sep 17 00:00:00 2001 From: Javier Fernandez Garcia-Boente Date: Thu, 30 Aug 2007 13:57:12 +0000 Subject: [PATCH] * Fixed crash on dimmin rules when M;MC root account is selected. pmo-trunk-r3156 --- src/modest-ui-dimming-rules.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/modest-ui-dimming-rules.c b/src/modest-ui-dimming-rules.c index f19faec..767d5e8 100644 --- a/src/modest-ui-dimming-rules.c +++ b/src/modest-ui-dimming-rules.c @@ -360,11 +360,13 @@ modest_ui_dimming_rules_on_new_folder (ModestWindow *win, gpointer user_data) dimmed = FALSE; } else { const gchar *proto_str = tny_account_get_proto (TNY_ACCOUNT (parent_folder)); - /* If it's POP then dim */ - dimmed = (modest_protocol_info_get_transport_store_protocol (proto_str) == - MODEST_PROTOCOL_STORE_POP) ? TRUE : FALSE; - if (dimmed) - modest_dimming_rule_set_notification (rule, _("mail_in_ui_folder_create_error")); + if (proto_str != NULL) { + /* If it's POP then dim */ + dimmed = (modest_protocol_info_get_transport_store_protocol (proto_str) == + MODEST_PROTOCOL_STORE_POP) ? TRUE : FALSE; + if (dimmed) + modest_dimming_rule_set_notification (rule, _("mail_in_ui_folder_create_error")); + } } } else { /* TODO: the specs say that only one level of subfolder is allowed, is this true ? */ -- 1.7.9.5