diff options
author | 2019-04-23 09:15:24 +0000 | |
---|---|---|
committer | 2019-04-23 09:15:24 +0000 | |
commit | 9a0e05b8bcabbd6285fa667ae5e47a87d23876ab (patch) | |
tree | 53b2b772bc0fdd598e0c9f7dfa8a439cb97dcfb0 /usr.bin/tmux/layout.c | |
parent | Copy cache-control bits from U+K to U-K entry in pmap_enter_special() (diff) | |
download | wireguard-openbsd-9a0e05b8bcabbd6285fa667ae5e47a87d23876ab.tar.xz wireguard-openbsd-9a0e05b8bcabbd6285fa667ae5e47a87d23876ab.zip |
Do not try to resize if the parent cell is NULL, problem reported by
Sunil Nimmagadda.
Diffstat (limited to 'usr.bin/tmux/layout.c')
-rw-r--r-- | usr.bin/tmux/layout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/layout.c b/usr.bin/tmux/layout.c index c631eff2e2a..c36f9641c83 100644 --- a/usr.bin/tmux/layout.c +++ b/usr.bin/tmux/layout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: layout.c,v 1.42 2019/04/17 14:44:33 nicm Exp $ */ +/* $OpenBSD: layout.c,v 1.43 2019/04/23 09:15:24 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -414,9 +414,9 @@ layout_destroy_cell(struct window *w, struct layout_cell *lc, lcother = TAILQ_NEXT(lc, entry); else lcother = TAILQ_PREV(lc, layout_cells, entry); - if (lcparent->type == LAYOUT_LEFTRIGHT) + if (lcother != NULL && lcparent->type == LAYOUT_LEFTRIGHT) layout_resize_adjust(w, lcother, lcparent->type, lc->sx + 1); - else + else if (lcother != NULL) layout_resize_adjust(w, lcother, lcparent->type, lc->sy + 1); /* Remove this from the parent's list. */ |