mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
Do not use NULL active window; also do not leak window name. GitHub
issue 2590 from Chester Liu.
This commit is contained in:
parent
c44750792a
commit
81f9a23d25
2
names.c
2
names.c
@ -109,6 +109,8 @@ default_window_name(struct window *w)
|
||||
{
|
||||
char *cmd, *s;
|
||||
|
||||
if (w->active == NULL)
|
||||
return (xstrdup(""));
|
||||
cmd = cmd_stringify_argv(w->active->argc, w->active->argv);
|
||||
if (cmd != NULL && *cmd != '\0')
|
||||
s = parse_window_name(cmd);
|
||||
|
Loading…
Reference in New Issue
Block a user