Fix crash when killing the current window, reported by Jesus Rafael

Sanchez in GitHub issue 1760.
pull/1761/head
nicm 2019-05-27 12:48:52 +00:00
parent 6b332127ca
commit ae3eba6e08
1 changed files with 2 additions and 0 deletions

View File

@ -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