check for invalid param

pull/7089/head
paul-szczepanek-arm 2018-05-29 16:31:50 +01:00
parent 3a2dc69f11
commit ff7b13837f
1 changed files with 3 additions and 0 deletions

View File

@ -142,6 +142,9 @@ ble_error_t GenericSecurityManager::purgeAllBondingState(void) {
ble_error_t GenericSecurityManager::generateWhitelistFromBondTable(Gap::Whitelist_t *whitelist) const {
if (!_db) return BLE_ERROR_INITIALIZATION_INCOMPLETE;
if (eventHandler) {
if (!whitelist) {
return BLE_ERROR_INVALID_PARAM;
}
_db->generate_whitelist_from_bond_table(
mbed::callback(eventHandler, &::SecurityManager::EventHandler::whitelistFromBondTable),
whitelist