summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2019-05-27 12:48:52 +0000
committernicm <nicm>2019-05-27 12:48:52 +0000
commitae3eba6e08a8ff36a63b328880d4a97f21e1108b (patch)
tree0e2f335a10d9938a3c1b7a22cd23069dffec56c6
parent6b332127cae97914d34c39575881fbc87205f4e0 (diff)
Fix crash when killing the current window, reported by Jesus Rafael
Sanchez in GitHub issue 1760.
-rw-r--r--spawn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/spawn.c b/spawn.c
index 986a1e9d..bae220e1 100644
--- a/spawn.c
+++ b/spawn.c
@@ -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