Skip to content

Commit 6806aaf

Browse files
committed
Keep BLERemoteService::removeCharacteristics from deleting characteristics twice (=> crashing)
1 parent 13e0206 commit 6806aaf

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

libraries/BLE/src/BLERemoteService.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,6 @@ std::string BLERemoteService::getValue(BLEUUID characteristicUuid) {
302302
* @return N/A.
303303
*/
304304
void BLERemoteService::removeCharacteristics() {
305-
for (auto &myPair : m_characteristicMap) {
306-
delete myPair.second;
307-
//m_characteristicMap.erase(myPair.first); // Should be no need to delete as it will be deleted by the clear
308-
}
309305
m_characteristicMap.clear(); // Clear the map
310306
for (auto &myPair : m_characteristicMapByHandle) {
311307
delete myPair.second;

0 commit comments

Comments
 (0)