1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-24 19:06:53 +01:00

Avoid possible NPE

This commit is contained in:
cpfeiffer 2018-09-17 22:28:13 +02:00
parent cfddba0e4d
commit d3fd203c6c

View File

@ -85,7 +85,11 @@ public class TimePreference extends DialogPreference {
time = getPersistedString(defaultValue.toString());
}
} else {
time = defaultValue.toString();
if (defaultValue != null) {
time = defaultValue.toString();
} else {
time = "00:00";
}
}
String[] pieces = time.split(":");