Need to set clients in context before changing their reference count.

This commit is contained in:
Nicholas Marriott
2013-03-22 15:54:29 +00:00
parent d644e5143f
commit 2243cfbe75
8 changed files with 15 additions and 18 deletions

5
cmd.c
View File

@ -134,13 +134,16 @@ int cmd_find_index_offset(const char *, struct session *, int *);
struct window_pane *cmd_find_pane_offset(const char *, struct winlink *);
struct cmd_ctx *
cmd_get_ctx(void)
cmd_get_ctx(struct client *cmdclient, struct client *curclient)
{
struct cmd_ctx *ctx;
ctx = xcalloc(1, sizeof *ctx);
ctx->references = 0;
ctx->cmdclient = cmdclient;
ctx->curclient = curclient;
cmd_ref_ctx(ctx);
return (ctx);
}