From 6806aafcafbef22f6db18d7c4766eb874df17aaa Mon Sep 17 00:00:00 2001 From: Nitek Date: Mon, 24 Feb 2020 22:02:45 +0100 Subject: [PATCH] Keep BLERemoteService::removeCharacteristics from deleting characteristics twice (=> crashing) --- libraries/BLE/src/BLERemoteService.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libraries/BLE/src/BLERemoteService.cpp b/libraries/BLE/src/BLERemoteService.cpp index 278e9c1cab4..ad13416bd9a 100644 --- a/libraries/BLE/src/BLERemoteService.cpp +++ b/libraries/BLE/src/BLERemoteService.cpp @@ -302,10 +302,6 @@ std::string BLERemoteService::getValue(BLEUUID characteristicUuid) { * @return N/A. */ void BLERemoteService::removeCharacteristics() { - for (auto &myPair : m_characteristicMap) { - delete myPair.second; - //m_characteristicMap.erase(myPair.first); // Should be no need to delete as it will be deleted by the clear - } m_characteristicMap.clear(); // Clear the map for (auto &myPair : m_characteristicMapByHandle) { delete myPair.second;