minor sanity check for DiscoveredCharacteristic::writeWoResponse()

This commit is contained in:
Rohit Grover 2015-06-05 09:21:24 +01:00
parent 1a9e68e197
commit ee29ce32ef
1 changed files with 4 additions and 0 deletions

View File

@ -40,5 +40,9 @@ DiscoveredCharacteristic::writeWoResponse(uint16_t length, const uint8_t *value)
return BLE_ERROR_OPERATION_NOT_PERMITTED;
}
if (!gattc) {
return BLE_ERROR_INVALID_STATE;
}
return gattc->write(GattClient::OP_WRITE_CMD, connHandle, length, value);
}