prevent ArrayIndexOutOfBoundsException
This commit is contained in:
parent
45f168d427
commit
c2e5470da7
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ class MainActivity : NoSplashAppCompatActivity() {
|
|||
}
|
||||
|
||||
private fun checkPluginPreferences(viewPager: ViewPager2) {
|
||||
pluginPreferencesMenuItem?.isEnabled = (viewPager.adapter as TabPageAdapter).getPluginAt(viewPager.currentItem).preferencesId != -1
|
||||
if (viewPager.currentItem > 0) pluginPreferencesMenuItem?.isEnabled = (viewPager.adapter as TabPageAdapter).getPluginAt(viewPager.currentItem).preferencesId != -1
|
||||
}
|
||||
|
||||
override fun onPostCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) {
|
||||
|
|
Loading…
Reference in a new issue