Do not attempt to use client in config file (it will be NULL), GitHub
authornicm <nicm@openbsd.org>
Thu, 2 Jun 2022 21:19:32 +0000 (21:19 +0000)
committernicm <nicm@openbsd.org>
Thu, 2 Jun 2022 21:19:32 +0000 (21:19 +0000)
issue 3206.

usr.bin/tmux/cmd-run-shell.c

index 2d4d4b8..8b9ec15 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-run-shell.c,v 1.83 2022/05/30 13:00:18 nicm Exp $ */
+/* $OpenBSD: cmd-run-shell.c,v 1.84 2022/06/02 21:19:32 nicm Exp $ */
 
 /*
  * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -84,7 +84,7 @@ cmd_run_shell_print(struct job *job, const char *msg)
 
        if (cdata->wp_id != -1)
                wp = window_pane_find_by_id(cdata->wp_id);
-       if (wp == NULL && cdata->item != NULL)
+       if (wp == NULL && cdata->item != NULL && cdata->client != NULL)
                wp = server_client_get_pane(cdata->client);
        if (wp == NULL && cmd_find_from_nothing(&fs, 0) == 0)
                wp = fs.wp;