diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-04-23 09:15:25 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-04-23 09:15:25 +0000 |
commit | e15b2eb629957af06e690b3ee6debd2c450310f4 (patch) | |
tree | df72aa1dc4437da99721416d20cd2ba0d549d034 | |
parent | 0f5a95b0970b38f7ff517ef7f977b99afe47c0a7 (diff) |
Do not try to resize if the parent cell is NULL, problem reported by
Sunil Nimmagadda.
-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. */ |