diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-12-01 09:41:04 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-12-01 09:41:04 +0000 |
commit | 98b8c81e4e9271f9bd3083b5faaa39c68ef66693 (patch) | |
tree | c56c7638a6f8a81c1660ebe6f94cfcb613713705 | |
parent | 5e48019ecb831081eb58c7842321b0a5184b2456 (diff) |
Do not deref wp if window_get_active_at returns NULL which can happen on
very large terminals, from Michael Graczyk.
-rw-r--r-- | usr.bin/tmux/server-client.c | 9 |
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); |