diff options
| author | Dan Halbert <halbert@halwitz.org> | 2020-08-15 14:39:53 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2020-08-15 14:39:53 -0400 |
| commit | ef40f83f99c3e529619302a42d3532ba09420dc2 (patch) | |
| tree | c12db5e138d384cf74aa1c1e7a1831a86d7d4f2a | |
| parent | 9fc7118861a118b9e0a7e37b6bc902654ee11401 (diff) | |
Remove event handler before setting it to NULL
| -rw-r--r-- | ports/nrf/common-hal/_bleio/Adapter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/nrf/common-hal/_bleio/Adapter.c b/ports/nrf/common-hal/_bleio/Adapter.c index 0b23bb7bf..59cfcd37f 100644 --- a/ports/nrf/common-hal/_bleio/Adapter.c +++ b/ports/nrf/common-hal/_bleio/Adapter.c @@ -472,8 +472,8 @@ mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t* err_code = sd_ble_gap_scan_start(&scan_params, sd_data); if (err_code != NRF_SUCCESS) { - self->scan_results = NULL; ble_drv_remove_event_handler(scan_on_ble_evt, self->scan_results); + self->scan_results = NULL; check_nrf_error(err_code); } |
