mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 16:28:48 +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
2
format.c
2
format.c
@ -643,6 +643,8 @@ format_find(struct format_tree *ft, const char *key, int modifiers)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
found:
|
found:
|
||||||
|
if (found == NULL)
|
||||||
|
return (NULL);
|
||||||
copy = xstrdup(found);
|
copy = xstrdup(found);
|
||||||
if (modifiers & FORMAT_BASENAME) {
|
if (modifiers & FORMAT_BASENAME) {
|
||||||
saved = copy;
|
saved = copy;
|
||||||
|
Loading…
Reference in New Issue
Block a user