Fix crash when tab isn't available
This commit is contained in:
parent
d593362ba8
commit
0c988d95ee
1 changed files with 3 additions and 3 deletions
|
@ -100,10 +100,10 @@ class BrowseController :
|
||||||
activity?.tabs?.apply {
|
activity?.tabs?.apply {
|
||||||
val updates = preferences.extensionUpdatesCount().get()
|
val updates = preferences.extensionUpdatesCount().get()
|
||||||
if (updates > 0) {
|
if (updates > 0) {
|
||||||
val badge: BadgeDrawable = getTabAt(1)!!.orCreateBadge
|
val badge: BadgeDrawable? = getTabAt(1)?.orCreateBadge
|
||||||
badge.isVisible = true
|
badge?.isVisible = true
|
||||||
} else {
|
} else {
|
||||||
getTabAt(EXTENSIONS_CONTROLLER)!!.removeBadge()
|
getTabAt(EXTENSIONS_CONTROLLER)?.removeBadge()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue