mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-24 19:06:53 +01:00
Avoid possible NPE
This commit is contained in:
parent
cfddba0e4d
commit
d3fd203c6c
@ -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(":");
|
||||
|
Loading…
Reference in New Issue
Block a user