summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/format.c b/format.c
index 5ca970b7..3d649a29 100644
--- a/format.c
+++ b/format.c
@@ -1112,7 +1112,7 @@ format_find(struct format_tree *ft, const char *key, int modifiers)
envent = environ_find(ft->s->environ, key);
if (envent == NULL)
envent = environ_find(global_environ, key);
- if (envent != NULL) {
+ if (envent != NULL && envent->value != NULL) {
found = xstrdup(envent->value);
goto found;
}