=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-kill-window.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- src/usr.bin/tmux/cmd-kill-window.c 2012/04/23 22:10:45 1.9 +++ src/usr.bin/tmux/cmd-kill-window.c 2012/05/29 08:11:34 1.10 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-kill-window.c,v 1.9 2012/04/23 22:10:45 nicm Exp $ */ +/* $OpenBSD: cmd-kill-window.c,v 1.10 2012/05/29 08:11:34 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -41,12 +41,13 @@ { struct args *args = self->args; struct winlink *wl, *wl2; + struct session *s; - if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL) + if ((wl = cmd_find_window(ctx, args_get(args, 't'), &s)) == NULL) return (-1); if (args_has(args, 'a')) { - RB_FOREACH(wl2, winlinks, &ctx->curclient->session->windows) { + RB_FOREACH(wl2, winlinks, &s->windows) { if (wl != wl2) server_kill_window(wl2->window); }