aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-04-23 11:02:36 +0100
committerThomas Adam <thomas@xteddy.org>2019-04-23 11:02:36 +0100
commit4a96f599f6d52d34283f2c5a537fb330673e065e (patch)
tree7a209ea8eb8050a98b45408f3dc4267671dc7c20
parent51c09bf2b41452ec0bb5b1b890fc32a989691df9 (diff)
parent6752f41c2a5ddfe2ac41ffd6a658a0f387b75804 (diff)
downloadrtmux-4a96f599f6d52d34283f2c5a537fb330673e065e.tar.gz
rtmux-4a96f599f6d52d34283f2c5a537fb330673e065e.tar.bz2
rtmux-4a96f599f6d52d34283f2c5a537fb330673e065e.zip
Merge branch 'obsd-master'
-rw-r--r--layout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/layout.c b/layout.c
index f974e10d..86d307ef 100644
--- a/layout.c
+++ b/layout.c
@@ -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. */