diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c index 94ab9caeec71..9bc88385768a 100644 --- a/sys/dev/ral/rt2661.c +++ b/sys/dev/ral/rt2661.c @@ -900,11 +900,12 @@ rt2661_tx_intr(struct rt2661_softc *sc) data->m = NULL; ni = data->ni; data->ni = NULL; - vap = ni->ni_vap; /* if no frame has been sent, ignore */ if (ni == NULL) continue; + else + vap = ni->ni_vap; switch (RT2661_TX_RESULT(val)) { case RT2661_TX_SUCCESS: