Fix possible npe
This commit is contained in:
parent
a8c732df4e
commit
9e364a0103
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ public class EnumStringPreference<E extends Enum<E>> extends CommonPreference<E>
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String toString(E o) {
|
protected String toString(E o) {
|
||||||
return o.name();
|
return o == null ? null : o.name();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue