add a sanity check to DiscoveredCharacteristic::read().

This commit is contained in:
Rohit Grover 2015-06-05 08:01:58 +01:00
parent a7c6dc1ac7
commit a7cf062930
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,10 @@ DiscoveredCharacteristic::read(uint16_t offset) const
return BLE_ERROR_OPERATION_NOT_PERMITTED;
}
if (!gattc) {
return BLE_ERROR_INVALID_STATE;
}
return gattc->read(connHandle, valueHandle, offset);
}