v0.4.2: added a safety check to validation of string preferences

This commit is contained in:
Evan Debenham 2016-08-21 00:12:02 -04:00 committed by Evan Debenham
parent 710bbca66b
commit 02166c319b

View File

@ -93,7 +93,7 @@ enum Preferences {
String getString( String key, String defValue, int maxLength ) {
try {
String s = get().getString( key, defValue );
if (s.length() > maxLength) {
if (s != null && s.length() > maxLength) {
put(key, defValue);
return defValue;
} else {