mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 10:25:37 +00:00
The format callback may not always succeed, so we need to check for
NULL. From Patrick Palka.
This commit is contained in:
parent
3fc001d0a2
commit
17c2c4219d
1 changed files with 2 additions and 0 deletions
2
format.c
2
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue