diff --git a/src/device.c b/src/device.c index f7bd1fa2..59a59c66 100644 --- a/src/device.c +++ b/src/device.c @@ -52,7 +52,6 @@ struct device { struct wiphy *wiphy; struct netdev *netdev; - struct station *station; bool powered : 1; @@ -67,7 +66,10 @@ static void device_ap_roam_frame_event(struct netdev *netdev, void *user_data) { struct device *device = user_data; - struct station *station = device->station; + struct station *station = station_find(device->index); + + if (!station) + return; station_ap_directed_roam(station, hdr, body, body_len); }