applied, thanks
On Sat, Mar 01, 2014 at 09:54:03AM +0000, Thomas Adam wrote: > Don't segfaut when the parent of the layout cell is NULL; also assign the > lc->parent component to a common variable and use that throughout this > function. > --- > window.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/window.c b/window.c > index 1dd70c4..f25f64e 100644 > --- a/window.c > +++ b/window.c > @@ -420,10 +420,13 @@ 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; > + > + if ((lcparent = nextwp->layout_cell->parent) == 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,7 +435,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; > + lc2 = lcparent; > for (; lc2 != NULL; lc2 = lc2->parent) { > if (lc == lc2) > return; > -- > 1.8.4.rc2 > > > ------------------------------------------------------------------------------ > Flow-based real-time traffic analytics software. Cisco certified tool. > Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer > Customize your own dashboards, set traffic alerts and generate reports. > Network behavioral analysis & security monitoring. All-in-one tool. > http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ 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-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users