The branch, master has been updated via 78e783e7863eb33981da4a5ad48dd9e2aa2b08dd (commit) from cbd360b7dd1f2ca1a3208d3e19af84e0e536f6b9 (commit)
- Log ----------------------------------------------------------------- commit 78e783e7863eb33981da4a5ad48dd9e2aa2b08dd Author: Nicholas Marriott <nicholas.marri...@gmail.com> Commit: Nicholas Marriott <nicholas.marri...@gmail.com> Don't segfaut when the parent of the layout cell is NULL, from Thomas Adam. --- window.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/window.c b/window.c index 1dd70c4..9a26b90 100644 --- a/window.c +++ b/window.c @@ -420,10 +420,15 @@ window_pane_active_set(struct window_pane *wp, struct window_pane *nextwp) void window_pane_active_lost(struct window_pane *wp, struct window_pane *nextwp) { - struct layout_cell *lc, *lc2; + struct layout_cell *lc, *lc2, *lcparent; + + /* Get the parent cell. */ + lcparent = nextwp->layout_cell->parent; + if (lcparent == NULL) + return; /* Save the target pane in its parent. */ - nextwp->layout_cell->parent->lastwp = nextwp; + lcparent->lastwp = nextwp; /* * Save the source pane in all of its parents up to, but not including, @@ -432,8 +437,7 @@ window_pane_active_lost(struct window_pane *wp, struct window_pane *nextwp) if (wp == NULL) return; for (lc = wp->layout_cell->parent; lc != NULL; lc = lc->parent) { - lc2 = nextwp->layout_cell->parent; - for (; lc2 != NULL; lc2 = lc2->parent) { + for (lc2 = lcparent; lc2 != NULL; lc2 = lc2->parent) { if (lc == lc2) return; } ----------------------------------------------------------------------- Summary of changes: window.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) hooks/post-receive -- tmux ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ tmux-cvs mailing list tmux-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-cvs