From 50508a6e75e8bfa955b9193f0b6252ff2e235220 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 15 Sep 2011 15:06:20 +0000 Subject: Ensure root bw and gui window before asking front end to remove caret. svn path=/trunk/netsurf/; revision=12795 --- desktop/textinput.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/textinput.c b/desktop/textinput.c index ba89f72a3..63e17debe 100644 --- a/desktop/textinput.c +++ b/desktop/textinput.c @@ -102,7 +102,8 @@ void browser_window_remove_caret(struct browser_window *bw) root_bw = browser_window_get_root(bw); - gui_window_remove_caret(root_bw->window); + if (root_bw && root_bw->window) + gui_window_remove_caret(root_bw->window); bw->caret_callback = NULL; bw->paste_callback = NULL; -- cgit v1.2.3