From a785a7f7005761a3ab52b8c336e1ff5881eb7d83 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 1 Dec 2015 09:41:03 +0000 Subject: Do not deref wp if window_get_active_at returns NULL which can happen on very large terminals, from Michael Graczyk. --- server-client.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'server-client.c') diff --git a/server-client.c b/server-client.c index c5e93438..d2abd356 100644 --- a/server-client.c +++ b/server-client.c @@ -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); -- cgit v1.2.3