Bugfix: crash if heart rate sensor was null (i.e., preference not initialized).

This commit is contained in:
Dennis Guse
2019-11-29 23:17:49 +01:00
parent 4c6601fbc5
commit c0672c41df
2 changed files with 3 additions and 2 deletions
@@ -6,4 +6,5 @@ Changes:
Bugfixes:
- Export via KMZ did not export picture filenames correctly
- Sharing multiple tracks did not include KMZ files
- MarkerDetailActivity's UI was not shown
- MarkerDetailActivity's UI was not shown
- Settings crashed if preference of heart rate was not initialized
@@ -147,7 +147,7 @@ public class BluetoothLePreference extends DialogPreference {
BluetoothLePreference preference = (BluetoothLePreference) getPreference();
String deviceSelected = preference.getValue();
if (!deviceNone.equals(deviceSelected)) {
if (deviceSelected != null && !deviceNone.equals(deviceSelected)) {
listAdapter.add(preference.getValue(), preference.getValue());
selectedEntryIndex = 1;
}