mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Fix crash when killing the current window, reported by Jesus Rafael
Sanchez in GitHub issue 1760.
This commit is contained in:
parent
6b332127ca
commit
ae3eba6e08
2
spawn.c
2
spawn.c
@ -161,6 +161,8 @@ spawn_window(struct spawn_context *sc, char **cause)
|
|||||||
xasprintf(cause, "couldn't create window %d", idx);
|
xasprintf(cause, "couldn't create window %d", idx);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
if (s->curw == NULL)
|
||||||
|
s->curw = sc->wl;
|
||||||
sc->wl->session = s;
|
sc->wl->session = s;
|
||||||
winlink_set_window(sc->wl, w);
|
winlink_set_window(sc->wl, w);
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user