diff options
author | 2016-10-05 12:32:13 +0000 | |
---|---|---|
committer | 2016-10-05 12:32:13 +0000 | |
commit | ba7700290f1d5b433648055e9069d890c73d50e4 (patch) | |
tree | 753fad2f36699d349e8d314176d8ccc16ee0a9ef /usr.bin/tmux/cmd.c | |
parent | More debugging (diff) | |
download | wireguard-openbsd-ba7700290f1d5b433648055e9069d890c73d50e4.tar.xz wireguard-openbsd-ba7700290f1d5b433648055e9069d890c73d50e4.zip |
Allow cmd_mouse_at return arguments to be NULL.
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r-- | usr.bin/tmux/cmd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c index c571795f89f..730c96701cd 100644 --- a/usr.bin/tmux/cmd.c +++ b/usr.bin/tmux/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.122 2016/03/01 12:06:07 nicm Exp $ */ +/* $OpenBSD: cmd.c,v 1.123 2016/10/05 12:32:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -601,8 +601,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); } |