diff --git a/src/ble/le_device_db_tlv.c b/src/ble/le_device_db_tlv.c index 4af3e38b1..0865e02f0 100644 --- a/src/ble/le_device_db_tlv.c +++ b/src/ble/le_device_db_tlv.c @@ -175,6 +175,9 @@ int le_device_db_max_count(void){ } void le_device_db_remove(int index){ + // check if entry exists + if (entry_map[index] == 0) return; + // delete entry in TLV le_device_db_tlv_delete(index);