summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-10-23 11:21:11 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-10-23 11:21:11 +0100
commit89b669919e93507c6fbd6d89bdee2cd0d8144f9a (patch)
tree8b0a5a6e9be52e6f21d6e14870e413bad75320e4
parent640bb77330114b1e08d7bb57080dc3a45a5e5baf (diff)
downloadnetsurf-89b669919e93507c6fbd6d89bdee2cd0d8144f9a.tar.gz
netsurf-89b669919e93507c6fbd6d89bdee2cd0d8144f9a.tar.bz2
Fix NULL check after deref.
-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);
}