summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/textinput.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop/textinput.c b/desktop/textinput.c
index d2a9dadc4..e804829fa 100644
--- a/desktop/textinput.c
+++ b/desktop/textinput.c
@@ -103,13 +103,14 @@ void browser_window_remove_caret(struct browser_window *bw, bool only_hide)
struct browser_window *root_bw;
root_bw = browser_window_get_root(bw);
+ assert(root_bw != NULL);
if (only_hide)
root_bw->can_edit = true;
else
root_bw->can_edit = false;
- if (root_bw && root_bw->window)
+ if (root_bw->window)
gui_window_remove_caret(root_bw->window);
}