-
-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on BLEDevice::deleteClient(pClient) #18
Comments
Thanks! I totally forgot about this when I added the default callbacks. Will fix asap. One comment, if you are just wanting to connect the client instance to a different device you don't need to delete the client, just call connect with |
Thnx for the comment, I can use it! Still I need to clean up everything, to use the ESP for other tasks after reading the BLE peripherals. |
Fixed in commit 846d690 Thanks! |
Fixed by commit |
I am trying to reuse the client, so I call
BLEDevice::deleteClient(pClient)
. This causes a crash:This is because
BLEClient::m_deleteCallbacks
is defaulttrue
andBLEClient::BLEClient()
sets the pointerm_pClientCallbacks
to&defaultCallbacks
. So before deleting this pointer, it should be checked that it does not point to&defaultCallbacks
:The text was updated successfully, but these errors were encountered: