Commit 2a6aa754 authored by Danny Baumann's avatar Danny Baumann

Fix NPE.

Happened when current page is about:blank and the URL bar is focussed.
Unlike setText(), setTextKeepState() can't deal with null input.

Change-Id: Idf53caade6df2d54578393101a59164ccf1cf23d
parent b6ba24fa
......@@ -72,7 +72,8 @@ public class UrlBarController implements View.OnFocusChangeListener {
}
private void updateUrlBarText() {
mEditor.setTextKeepState(!mUrlBarHasFocus && !mLoading && mTitle != null ? mTitle : mUrl);
final String text = !mUrlBarHasFocus && !mLoading && mTitle != null ? mTitle : mUrl;
mEditor.setTextKeepState(text != null ? text : "");
}
private boolean isSecure() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment