Commit 44625ae5 authored by Mygod's avatar Mygod

Bugfix for DropDownPreference

parent 159e1dff
......@@ -120,7 +120,7 @@ final class DropDownPreference(private val mContext: Context, attrs: AttributeSe
*
* @return The value of the key.
*/
def getValue = if (mEntryValues == null) null else mEntryValues(mSelectedIndex).toString
def getValue = if (mEntryValues == null || mSelectedIndex < 0) null else mEntryValues(mSelectedIndex).toString
/**
* Returns the entry corresponding to the current value.
......
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