High level Bluetooth Low Energy API and radio abstraction layer
Fork of BLE_API by
Revision 643:fa85e59ad928, committed 2015-06-19
- Comitter:
- rgrover1
- Date:
- Fri Jun 19 15:52:58 2015 +0100
- Parent:
- 642:f7c865bde6ff
- Child:
- 644:ca872b3aaa8a
- Commit message:
- Synchronized with git rev a7cf0629
Author: Rohit Grover
add a sanity check to DiscoveredCharacteristic::read().
Changed in this revision
common/DiscoveredCharacteristic.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/common/DiscoveredCharacteristic.cpp Fri Jun 19 15:52:58 2015 +0100 +++ b/common/DiscoveredCharacteristic.cpp Fri Jun 19 15:52:58 2015 +0100 @@ -37,6 +37,10 @@ return BLE_ERROR_OPERATION_NOT_PERMITTED; } + if (!gattc) { + return BLE_ERROR_INVALID_STATE; + } + return gattc->read(connHandle, valueHandle, offset); }