Do not deref wp if window_get_active_at returns NULL which can happen on

very large terminals, from Michael Graczyk.
pull/210/merge
nicm 2015-12-01 09:41:03 +00:00
parent 1d331c7e62
commit a785a7f700
1 changed files with 4 additions and 3 deletions

View File

@ -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);