Skip to content

Commit

Permalink
Avoid a potential NULL pointer reference in nrf52/BluetoothPhoneAPI (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
esev authored Jan 12, 2025
1 parent fd60c9b commit 124936b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/platform/nrf52/NRF52Bluetooth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ class BluetoothPhoneAPI : public PhoneAPI
}

/// Check the current underlying physical link to see if the client is currently connected
virtual bool checkIsConnected() override
{
BLEConnection *connection = Bluefruit.Connection(connectionHandle);
return connection->connected();
}
virtual bool checkIsConnected() override { return Bluefruit.connected(connectionHandle); }
};

static BluetoothPhoneAPI *bluetoothPhoneAPI;
Expand Down

0 comments on commit 124936b

Please sign in to comment.