summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/server-client.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-12-01 09:41:03 +0000
committernicm <nicm@openbsd.org>2015-12-01 09:41:03 +0000
commit4c306c9d6913dac6e6f53261fe277743b292e8c1 (patch)
tree038b2bdcb0bb40956d10d9e36fd44e909394f9a4 /usr.bin/tmux/server-client.c
parentadd IMSG_SMTP_CHECK_SENDER in preparation for another diff (diff)
downloadwireguard-openbsd-4c306c9d6913dac6e6f53261fe277743b292e8c1.tar.xz
wireguard-openbsd-4c306c9d6913dac6e6f53261fe277743b292e8c1.zip
Do not deref wp if window_get_active_at returns NULL which can happen on
very large terminals, from Michael Graczyk.
Diffstat (limited to 'usr.bin/tmux/server-client.c')
-rw-r--r--usr.bin/tmux/server-client.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index afae83692c7..12d2a630d6a 100644
--- a/usr.bin/tmux/server-client.c
+++ b/usr.bin/tmux/server-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.172 2015/11/23 20:53:09 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.173 2015/12/01 09:41:03 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -332,10 +332,11 @@ server_client_check_mouse(struct client *c)
where = BORDER;
else {
wp = window_get_active_at(s->curw->window, x, y);
- if (wp != NULL)
+ if (wp != NULL) {
where = PANE;
- log_debug("mouse at %u,%u is on pane %%%u", x, y,
- wp->id);
+ log_debug("mouse at %u,%u is on pane %%%u",
+ x, y, wp->id);
+ }
}
if (where == NOWHERE)
return (KEYC_NONE);