diff options
author | 2019-05-27 12:48:52 +0000 | |
---|---|---|
committer | 2019-05-27 12:48:52 +0000 | |
commit | 587f8a812fe9ab1ad6ad1affeb76adb43c95cff2 (patch) | |
tree | da180647373a46ac9cefabd1ef481b41d4b80916 /usr.bin/tmux/spawn.c | |
parent | Add an additional {} syntax for defining strings in the configuration (diff) | |
download | wireguard-openbsd-587f8a812fe9ab1ad6ad1affeb76adb43c95cff2.tar.xz wireguard-openbsd-587f8a812fe9ab1ad6ad1affeb76adb43c95cff2.zip |
Fix crash when killing the current window, reported by Jesus Rafael
Sanchez in GitHub issue 1760.
Diffstat (limited to 'usr.bin/tmux/spawn.c')
-rw-r--r-- | usr.bin/tmux/spawn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/spawn.c b/usr.bin/tmux/spawn.c index 241a40f63c2..35894e9f93f 100644 --- a/usr.bin/tmux/spawn.c +++ b/usr.bin/tmux/spawn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spawn.c,v 1.4 2019/05/25 06:58:10 nicm Exp $ */ +/* $OpenBSD: spawn.c,v 1.5 2019/05/27 12:48:52 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -161,6 +161,8 @@ spawn_window(struct spawn_context *sc, char **cause) xasprintf(cause, "couldn't create window %d", idx); return (NULL); } + if (s->curw == NULL) + s->curw = sc->wl; sc->wl->session = s; winlink_set_window(sc->wl, w); } else |