diff options
author | nicm <nicm> | 2019-11-28 21:18:38 +0000 |
---|---|---|
committer | nicm <nicm> | 2019-11-28 21:18:38 +0000 |
commit | c5d74b1debc404340dd2049c708f9eb599be706e (patch) | |
tree | 4ba868dca507ba8edf016fae71fe8068e83b0a80 /format.c | |
parent | fa409194d3dfe0095bf6572a253772f2825f5dec (diff) | |
download | rtmux-c5d74b1debc404340dd2049c708f9eb599be706e.tar.gz rtmux-c5d74b1debc404340dd2049c708f9eb599be706e.tar.bz2 rtmux-c5d74b1debc404340dd2049c708f9eb599be706e.zip |
Do not crash when a format doesn't exist, reported by Thomas Sattler.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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; } |