mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-11 01:21:56 +01:00
Pebble: fix npe in mario time handler
I shout stop for 2016! :D
This commit is contained in:
parent
b811247704
commit
5a83cb1c48
@ -26,6 +26,10 @@ class AppMessageHandlerMarioTime extends AppMessageHandler {
|
||||
}
|
||||
|
||||
private byte[] encodeMarioWeatherMessage(WeatherSpec weatherSpec) {
|
||||
if (weatherSpec == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ArrayList<Pair<Integer, Object>> pairs = new ArrayList<>(2);
|
||||
pairs.add(new Pair<>(KEY_WEATHER_ICON_ID, (Object) (byte) 1));
|
||||
pairs.add(new Pair<>(KEY_WEATHER_TEMPERATURE, (Object) (byte) (weatherSpec.currentTemp - 273)));
|
||||
|
Loading…
Reference in New Issue
Block a user