Stop Esc/Ctrl-[ crashing when browser_window selection is NULL

svn path=/trunk/netsurf/; revision=12786
This commit is contained in:
Chris Young 2011-09-11 09:39:44 +00:00
parent 9d952f2ae2
commit b3bf57ed79
1 changed files with 1 additions and 1 deletions

View File

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