From 0de40a2f933ae6641493a618a264c8423219ccce Mon Sep 17 00:00:00 2001 From: djcb Date: Sat, 21 Dec 2013 10:24:15 -0800 Subject: [PATCH] * minor change (try to workaround https://code.google.com/p/mu0/issues/detail?id=79, though I can't reproduce it at all) --- mu/mu-cmd-find.c | 6 ++++-- mu/mu-config.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mu/mu-cmd-find.c b/mu/mu-cmd-find.c index 1a1afb07..6bdd1806 100644 --- a/mu/mu-cmd-find.c +++ b/mu/mu-cmd-find.c @@ -455,9 +455,11 @@ static void output_plain_fields (MuMsg *msg, const char *fields, gboolean color, gboolean threads) { - const char* myfields; - int nonempty; + const char* myfields; + int nonempty; + g_return_if_fail (fields); + for (myfields = fields, nonempty = 0; *myfields; ++myfields) { MuMsgFieldId mfid; diff --git a/mu/mu-config.c b/mu/mu-config.c index 1810ebe5..1a72aba2 100644 --- a/mu/mu-config.c +++ b/mu/mu-config.c @@ -180,7 +180,7 @@ set_group_find_defaults (void) /* note, when no fields are specified, we use * date-from-subject, and sort descending by date. If fields * *are* specified, we sort in ascending order. */ - if (!MU_CONFIG.fields) { + if (!MU_CONFIG.fields || !*MU_CONFIG.fields) { MU_CONFIG.fields = "d f s"; if (!MU_CONFIG.sortfield) MU_CONFIG.sortfield = "d";