Return -1 not NULL on error, pointed out by Roy Marples.

pull/1/head
Nicholas Marriott 2009-07-15 15:09:17 +00:00
parent aa3403a343
commit 780fd8f7a6
1 changed files with 1 additions and 1 deletions

2
cmd.c
View File

@ -642,7 +642,7 @@ cmd_find_index(struct cmd_ctx *ctx, const char *arg, struct session **sp)
*/
if ((s = cmd_current_session(ctx)) == NULL) {
ctx->error(ctx, "can't establish current session");
return (NULL);
return (-1);
}
/* A NULL argument means the current session and "no window" (-1). */