nimble/ll: Fix regression on legacy connect
Without this patch we will get assert on legacy connect
@@ -2940,7 +2940,7 @@ ble_ll_init_rx_pkt_in(uint8_t pdu_type, uint8_t *rxbuf,
* Let's take the reference for handover to LL.
* There shall be one more, if not something went very wrong
*/
- if (!ble_ll_scan_aux_data_unref(aux_data)) {
+ if (aux_data && !ble_ll_scan_aux_data_unref(aux_data)) {
BLE_LL_ASSERT(0);
}
