prevent ArrayIndexOutOfBoundsException
This commit is contained in:
parent
5d53029b54
commit
83324c97a7
|
@ -275,9 +275,11 @@ class MainActivity : NoSplashAppCompatActivity() {
|
|||
}
|
||||
|
||||
private fun setPluginPreferenceMenuName() {
|
||||
if (main_pager.currentItem > 0) {
|
||||
val plugin = (main_pager.adapter as TabPageAdapter).getPluginAt(main_pager.currentItem)
|
||||
this.menu?.findItem(R.id.nav_plugin_preferences)?.title = resourceHelper.gs(R.string.nav_preferences_plugin, plugin.name)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
this.menu = menu
|
||||
|
|
Loading…
Reference in a new issue