mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Do not crash when a format doesn't exist, reported by Thomas Sattler.
This commit is contained in:
parent
fa409194d3
commit
c5d74b1deb
7
format.c
7
format.c
@ -1112,11 +1112,10 @@ format_find(struct format_tree *ft, const char *key, int modifiers)
|
||||
xasprintf(&found, "%lld", (long long)fe->t);
|
||||
goto found;
|
||||
}
|
||||
if (fe->value == NULL && fe->cb != NULL) {
|
||||
if (fe->value == NULL && fe->cb != NULL)
|
||||
fe->cb(ft, fe);
|
||||
if (fe->value == NULL)
|
||||
fe->value = xstrdup("");
|
||||
}
|
||||
if (fe->value == NULL)
|
||||
fe->value = xstrdup("");
|
||||
found = xstrdup(fe->value);
|
||||
goto found;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user