diff --git a/src/station.c b/src/station.c index ee4b76b0..a17d2832 100644 --- a/src/station.c +++ b/src/station.c @@ -1933,8 +1933,6 @@ static struct l_dbus_message *station_dbus_scan(struct l_dbus *dbus, if (station->scan_pending) return dbus_error_busy(message); - station->scan_pending = l_dbus_message_ref(message); - /* * If we're not connected and no hidden networks are seen & configured, * use passive scanning to hide our MAC address @@ -1960,6 +1958,8 @@ static struct l_dbus_message *station_dbus_scan(struct l_dbus *dbus, return dbus_error_failed(message); } + station->scan_pending = l_dbus_message_ref(message); + return NULL; }