Fix NULL check after deref.

This commit is contained in:
Michael Drake 2013-10-23 11:21:11 +01:00
parent 640bb77330
commit 89b669919e
1 changed files with 2 additions and 1 deletions

View File

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