Bug 1399148 - Check we actually have an Editable before searching for a span. r=jwu

MozReview-Commit-ID: EiUO8wWSyLB

--HG--
extra : rebase_source : f1775d6082e43f3984086143081681f4d6a3e5bc
This commit is contained in:
Jan Henning 2017-09-12 19:20:50 +02:00
Родитель 2df8570673
Коммит a1632b557b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -443,7 +443,7 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout {
final ForegroundColorSpan spanToCheck =
mTitle.isPrivateMode() ? mPrivateDomainColorSpan : mDomainColorSpan;
int domainEnd = text.getSpanEnd(spanToCheck);
final int domainEnd = text != null ? text.getSpanEnd(spanToCheck) : -1;
if (domainEnd == -1) {
// We're not showing a domain, just scroll to the start of the text.
mTitleScroll.scrollTo(0, 0);