summaryrefslogtreecommitdiffstats
path: root/window-copy.c
diff options
context:
space:
mode:
authornicm <nicm>2015-04-21 15:16:06 +0000
committernicm <nicm>2015-04-21 15:16:06 +0000
commit0610f443808cc284171a4abc14bd3f95a9f3a57b (patch)
treede99445a932499068070c84cd5132942ee5a1c4e /window-copy.c
parent07d93db427751512e6ae96a54e69846189da2dc2 (diff)
cmd_mouse_pane can return NULL, check for that.
Diffstat (limited to 'window-copy.c')
-rw-r--r--window-copy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/window-copy.c b/window-copy.c
index 4dc07354..eb00131e 100644
--- a/window-copy.c
+++ b/window-copy.c
@@ -2220,7 +2220,7 @@ window_copy_start_drag(struct client *c, unused struct mouse_event *m)
u_int x, y;
wp = cmd_mouse_pane(m, NULL, NULL);
- if (wp->mode != &window_copy_mode)
+ if (wp == NULL || wp->mode != &window_copy_mode)
return;
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;
wp = cmd_mouse_pane(m, NULL, NULL);
- if (wp->mode != &window_copy_mode)
+ if (wp == NULL || wp->mode != &window_copy_mode)
return;
data = wp->modedata;
@@ -2261,7 +2261,7 @@ window_copy_drag_release(unused struct client *c, struct mouse_event *m)
struct window_pane *wp;
wp = cmd_mouse_pane(m, NULL, NULL);
- if (wp->mode != &window_copy_mode)
+ if (wp == NULL || wp->mode != &window_copy_mode)
return;
window_copy_copy_selection(wp, NULL);