mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-02-04 04:54:10 +01:00
Don't crash when no firmware version available yet
This commit is contained in:
parent
55bf9ef784
commit
f5934dfb3b
@ -142,11 +142,13 @@ public class AmazfitBipSupport extends MiBand2Support {
|
|||||||
public void onSendWeather(WeatherSpec weatherSpec) {
|
public void onSendWeather(WeatherSpec weatherSpec) {
|
||||||
try {
|
try {
|
||||||
TransactionBuilder builder = performInitialized("Sending weather forecast");
|
TransactionBuilder builder = performInitialized("Sending weather forecast");
|
||||||
Version version = new Version(gbDevice.getFirmwareVersion());
|
|
||||||
|
|
||||||
boolean supportsConditionString = false;
|
boolean supportsConditionString = false;
|
||||||
if (version.compareTo(new Version("0.0.8.74")) >= 0) {
|
|
||||||
supportsConditionString = true;
|
if (gbDevice.getFirmwareVersion() != null) {
|
||||||
|
Version version = new Version(gbDevice.getFirmwareVersion());
|
||||||
|
if (version.compareTo(new Version("0.0.8.74")) >= 0) {
|
||||||
|
supportsConditionString = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final byte NR_DAYS = 2;
|
final byte NR_DAYS = 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user