# HG changeset patch # User Carl Byington # Date 1403287504 25200 # Node ID 37665a94fc39fc0962e6d7cce06298d67f1dc820 # Parent 398503d13f3555a9fbb9eda01bb8f31c544dec1e listpref value may be null diff -r 398503d13f35 -r 37665a94fc39 src/com/five_ten_sg/connectbot/HostEditorActivity.java --- a/src/com/five_ten_sg/connectbot/HostEditorActivity.java Thu Jun 19 15:59:57 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/HostEditorActivity.java Fri Jun 20 11:05:04 2014 -0700 @@ -355,7 +355,7 @@ // Fall through. } } - else if (pref instanceof ListPreference) { + else if ((pref instanceof ListPreference) && (value != null)) { ListPreference listPref = (ListPreference) pref; int entryIndex = listPref.findIndexOfValue(value.toString()); if (entryIndex >= 0) value = listPref.getEntries()[entryIndex];