From b3bf57ed79803a509bda72e361cef69e1ae20adf Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 11 Sep 2011 09:39:44 +0000 Subject: Stop Esc/Ctrl-[ crashing when browser_window selection is NULL svn path=/trunk/netsurf/; revision=12786 --- desktop/textinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop/textinput.c') diff --git a/desktop/textinput.c b/desktop/textinput.c index 1879f414c..ba89f72a3 100644 --- a/desktop/textinput.c +++ b/desktop/textinput.c @@ -140,7 +140,7 @@ bool browser_window_key_press(struct browser_window *bw, uint32_t key) return true; case KEY_ESCAPE: - if (selection_defined(bw->cur_sel)) { + if (bw->cur_sel && selection_defined(bw->cur_sel)) { selection_clear(bw->cur_sel, true); return true; } -- cgit v1.2.3