add a sanity check to DiscoveredCharacteristic::read().
This commit is contained in:
parent
a7c6dc1ac7
commit
a7cf062930
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue