diff options
author | nicm <nicm> | 2020-07-03 07:00:12 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-07-03 12:02:46 +0100 |
commit | 0d0fc13aaaea2fc32d39ea8cd5564dbadb40c718 (patch) | |
tree | eca94d8a6f27391f48f1258c31609c690b7683ac | |
parent | 83868ceb1a18013578265591cea7c04a6e0f0516 (diff) | |
download | rtmux-0d0fc13aaaea2fc32d39ea8cd5564dbadb40c718.tar.gz rtmux-0d0fc13aaaea2fc32d39ea8cd5564dbadb40c718.tar.bz2 rtmux-0d0fc13aaaea2fc32d39ea8cd5564dbadb40c718.zip |
Check if client is NULL before using it, GitHub issue 2295.
-rw-r--r-- | cmd-select-pane.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-select-pane.c b/cmd-select-pane.c index 313deefe..b0c78d74 100644 --- a/cmd-select-pane.c +++ b/cmd-select-pane.c @@ -205,7 +205,7 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item) return (CMD_RETURN_NORMAL); } - if (c->session != NULL && (c->flags & CLIENT_ACTIVEPANE)) + if (c != NULL && c->session != NULL && (c->flags & CLIENT_ACTIVEPANE)) activewp = server_client_get_pane(c); else activewp = w->active; @@ -214,7 +214,7 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item) if (window_push_zoom(w, args_has(args, 'Z'))) server_redraw_window(w); window_redraw_active_switch(w, wp); - if (c->session != NULL && (c->flags & CLIENT_ACTIVEPANE)) + if (c != NULL && c->session != NULL && (c->flags & CLIENT_ACTIVEPANE)) server_client_set_pane(c, wp); else if (window_set_active_pane(w, wp, 1)) cmd_find_from_winlink_pane(current, wl, wp, 0); |