Commit 6fb7330e authored by Mygod's avatar Mygod

Fix crash on unknown plugin

parent 974c2544
...@@ -41,7 +41,9 @@ class IconListPreference(context: Context, attrs: AttributeSet = null) extends L ...@@ -41,7 +41,9 @@ class IconListPreference(context: Context, attrs: AttributeSet = null) extends L
// a.recycle() // a.recycle()
// } // }
def getEntryIcon: Drawable = mEntryIcons(selectedEntry) def getEntryIcon: Drawable = try mEntryIcons(selectedEntry) catch {
case _: ArrayIndexOutOfBoundsException => null
}
def getEntryIcons: Array[Drawable] = mEntryIcons def getEntryIcons: Array[Drawable] = mEntryIcons
def setEntryIcons(entryIcons: Array[Drawable]): Unit = mEntryIcons = entryIcons def setEntryIcons(entryIcons: Array[Drawable]): Unit = mEntryIcons = entryIcons
......
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