-/* $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>
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;