diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-01 20:32:41 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-01 20:32:41 +0000 |
commit | cea201df20e918db06a2e9a01b1f144372522d9f (patch) | |
tree | 50a9badcf06162a4580a7baede82b06593915a41 /cmd-link-window.c | |
parent | 65f4284e7fe796e19b6d0c2ba57becee5394e730 (diff) |
Don't die if no dst window and -k to linkw.
Diffstat (limited to 'cmd-link-window.c')
-rw-r--r-- | cmd-link-window.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd-link-window.c b/cmd-link-window.c index 00e3b4a7..45cb4876 100644 --- a/cmd-link-window.c +++ b/cmd-link-window.c @@ -1,4 +1,4 @@ -/* $Id: cmd-link-window.c,v 1.9 2007-12-06 09:46:21 nicm Exp $ */ +/* $Id: cmd-link-window.c,v 1.10 2008-06-01 20:32:41 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -138,6 +138,10 @@ cmd_link_window_exec(void *ptr, struct cmd_ctx *ctx) data->dstidx = -1; if (data->flag_kill && data->dstidx != -1) { wl2 = winlink_find_by_index(&dst->windows, data->dstidx); + if (wl2 == NULL) { + ctx->error(ctx, "no window %d", data->dstidx); + return; + } /* * Can't use session_detach as it will destroy session if this |