diff options
author | nicm <nicm> | 2015-10-27 09:18:06 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-10-27 09:18:06 +0000 |
commit | 17c2c4219df2a8fec4c2f46f718a3fbbbfebe50a (patch) | |
tree | db5bb067c526024ffafbd67e141ef414fd38a91f /format.c | |
parent | 3fc001d0a2e2456fb266f689964fe116d58c2227 (diff) |
The format callback may not always succeed, so we need to check for
NULL. From Patrick Palka.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |