aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--format.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/format.c b/format.c
index 7ff11b59..0d7d7c20 100644
--- a/format.c
+++ b/format.c
@@ -643,6 +643,8 @@ format_find(struct format_tree *ft, const char *key, int modifiers)
return (NULL);
found:
+ if (found == NULL)
+ return (NULL);
copy = xstrdup(found);
if (modifiers & FORMAT_BASENAME) {
saved = copy;