issue 2590 from Chester Liu.
-/* $OpenBSD: names.c,v 1.43 2020/10/05 11:04:40 nicm Exp $ */
+/* $OpenBSD: names.c,v 1.44 2021/03/02 11:00:38 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
{
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);
-/* $OpenBSD: spawn.c,v 1.26 2021/03/02 10:56:45 nicm Exp $ */
+/* $OpenBSD: spawn.c,v 1.27 2021/03/02 11:00:38 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
NULL);
options_set_number(w->options, "automatic-rename", 0);
} else
- w->name = xstrdup(default_window_name(w));
+ w->name = default_window_name(w);
}
/* Switch to the new window if required. */