mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
fix crash
This commit is contained in:
@@ -185,7 +185,7 @@ public class ControlCenter extends Activity {
|
|||||||
|
|
||||||
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
String miAddr = sharedPrefs.getString("development_miaddr", null);
|
String miAddr = sharedPrefs.getString("development_miaddr", null);
|
||||||
if (miAddr != null && !miAddr.equals("") && !miAddr.equals(connectedDevice.getAddress())) {
|
if (miAddr != null && !miAddr.equals("") && (connectedDevice == null || !miAddr.equals(connectedDevice.getAddress()))) {
|
||||||
deviceList.add(new GBDevice(miAddr, "MI", GBDevice.Type.MIBAND));
|
deviceList.add(new GBDevice(miAddr, "MI", GBDevice.Type.MIBAND));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user