summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2014-02-22 20:48:44 +0000
committerThomas Adam <thomas@xteddy.org>2014-02-22 20:48:44 +0000
commit150ef868008385a79278a5a3d16169c16b2d880a (patch)
tree24d801ee28a847e0f2f1592b82c36488c7d0fb91 /window.c
parent2a412fad044e402391a1c82dc600ce03c7ce2bc5 (diff)
parent315d45a0eb596048f2513dab98e4bb47ec1852a4 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'window.c')
-rw-r--r--window.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/window.c b/window.c
index 858463cf..f41b58d0 100644
--- a/window.c
+++ b/window.c
@@ -407,8 +407,9 @@ window_pane_active_set(struct window_pane *wp, struct window_pane *nextwp)
* Previously active pane, if any, must not be the same as the source
* pane.
*/
- if (nextwp->layout_cell->parent != NULL) {
- lastwp = nextwp->layout_cell->parent->lastwp;
+ lc = nextwp->layout_cell->parent;
+ if (lc != NULL && lc->lastwp != NULL) {
+ lastwp = lc->lastwp;
if (lastwp != wp && window_pane_visible(lastwp))
return (lastwp);
}