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

This commit is contained in:
Nicholas Marriott
2013-02-20 10:25:15 +00:00
parent e68b9abd04
commit afd5e978cf
9 changed files with 12 additions and 15 deletions

5
cmd.c
View File

@ -133,13 +133,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);
}