=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-if-shell.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- src/usr.bin/tmux/cmd-if-shell.c 2017/04/21 14:01:19 1.53 +++ src/usr.bin/tmux/cmd-if-shell.c 2017/04/22 06:27:15 1.54 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-if-shell.c,v 1.53 2017/04/21 14:01:19 nicm Exp $ */ +/* $OpenBSD: cmd-if-shell.c,v 1.54 2017/04/22 06:27:15 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -120,7 +120,8 @@ cdata->cmd_else = NULL; cdata->client = item->client; - cdata->client->references++; + if (cdata->client != NULL) + cdata->client->references++; if (!args_has(args, 'b')) cdata->item = item; @@ -193,7 +194,8 @@ { struct cmd_if_shell_data *cdata = data; - server_client_unref(cdata->client); + if (cdata->client != NULL) + server_client_unref(cdata->client); free(cdata->cmd_else); free(cdata->cmd_if);