diff options
author | nicm <nicm> | 2014-02-22 18:01:10 +0000 |
---|---|---|
committer | nicm <nicm> | 2014-02-22 18:01:10 +0000 |
commit | 315d45a0eb596048f2513dab98e4bb47ec1852a4 (patch) | |
tree | 3147f055e9db3a95f6b0396865938054b70cdb0a /window.c | |
parent | c7f3599ebca82fcd1c2a00de234f90ac1f5f0ede (diff) | |
download | rtmux-315d45a0eb596048f2513dab98e4bb47ec1852a4.tar.gz rtmux-315d45a0eb596048f2513dab98e4bb47ec1852a4.tar.bz2 rtmux-315d45a0eb596048f2513dab98e4bb47ec1852a4.zip |
Fix crash due to uninitialized lastwp member of layout_cell, reported by
Balazs Kezes.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -410,8 +410,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); } |