-/* $OpenBSD: window-copy.c,v 1.128 2015/04/20 15:41:32 nicm Exp $ */
+/* $OpenBSD: window-copy.c,v 1.129 2015/04/21 15:16:06 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
u_int x, y;
wp = cmd_mouse_pane(m, NULL, NULL);
- if (wp->mode != &window_copy_mode)
+ if (wp == NULL || wp->mode != &window_copy_mode)
return;
if (cmd_mouse_at(wp, m, &x, &y, 1) != 0)
u_int x, y, old_cy;
wp = cmd_mouse_pane(m, NULL, NULL);
- if (wp->mode != &window_copy_mode)
+ if (wp == NULL || wp->mode != &window_copy_mode)
return;
data = wp->modedata;
struct window_pane *wp;
wp = cmd_mouse_pane(m, NULL, NULL);
- if (wp->mode != &window_copy_mode)
+ if (wp == NULL || wp->mode != &window_copy_mode)
return;
window_copy_copy_selection(wp, NULL);