aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2016-10-05 14:01:10 +0100
committerThomas Adam <thomas@xteddy.org>2016-10-05 14:01:10 +0100
commit5b8f033e06251ed13291becfedb305da46c36dc7 (patch)
treeda566439749aea47256854b925999fc98aadcd1e /cmd.c
parent4740ecbeaef04ece4e58edc0e29a21cd5282896f (diff)
parentf55c991a1b7ec25f03d977cabc7ae4563f37324a (diff)
downloadrtmux-5b8f033e06251ed13291becfedb305da46c36dc7.tar.gz
rtmux-5b8f033e06251ed13291becfedb305da46c36dc7.tar.bz2
rtmux-5b8f033e06251ed13291becfedb305da46c36dc7.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd.c b/cmd.c
index 28efa0c5..8668efa2 100644
--- a/cmd.c
+++ b/cmd.c
@@ -600,8 +600,10 @@ cmd_mouse_at(struct window_pane *wp, struct mouse_event *m, u_int *xp,
if (y < wp->yoff || y >= wp->yoff + wp->sy)
return (-1);
- *xp = x - wp->xoff;
- *yp = y - wp->yoff;
+ if (xp != NULL)
+ *xp = x - wp->xoff;
+ if (yp != NULL)
+ *yp = y - wp->yoff;
return (0);
}