mirror of
https://github.com/tmate-io/tmate.git
synced 2025-04-13 05:58:58 +02:00
cmd_mouse_pane can return NULL, check for that.
This commit is contained in:
parent
07d93db427
commit
0610f44380
@ -2220,7 +2220,7 @@ window_copy_start_drag(struct client *c, unused struct mouse_event *m)
|
|||||||
u_int x, y;
|
u_int x, y;
|
||||||
|
|
||||||
wp = cmd_mouse_pane(m, NULL, NULL);
|
wp = cmd_mouse_pane(m, NULL, NULL);
|
||||||
if (wp->mode != &window_copy_mode)
|
if (wp == NULL || wp->mode != &window_copy_mode)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (cmd_mouse_at(wp, m, &x, &y, 1) != 0)
|
if (cmd_mouse_at(wp, m, &x, &y, 1) != 0)
|
||||||
@ -2242,7 +2242,7 @@ window_copy_drag_update(unused struct client *c, struct mouse_event *m)
|
|||||||
u_int x, y, old_cy;
|
u_int x, y, old_cy;
|
||||||
|
|
||||||
wp = cmd_mouse_pane(m, NULL, NULL);
|
wp = cmd_mouse_pane(m, NULL, NULL);
|
||||||
if (wp->mode != &window_copy_mode)
|
if (wp == NULL || wp->mode != &window_copy_mode)
|
||||||
return;
|
return;
|
||||||
data = wp->modedata;
|
data = wp->modedata;
|
||||||
|
|
||||||
@ -2261,7 +2261,7 @@ window_copy_drag_release(unused struct client *c, struct mouse_event *m)
|
|||||||
struct window_pane *wp;
|
struct window_pane *wp;
|
||||||
|
|
||||||
wp = cmd_mouse_pane(m, NULL, NULL);
|
wp = cmd_mouse_pane(m, NULL, NULL);
|
||||||
if (wp->mode != &window_copy_mode)
|
if (wp == NULL || wp->mode != &window_copy_mode)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
window_copy_copy_selection(wp, NULL);
|
window_copy_copy_selection(wp, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user