netdev: prevent crash with open networks

The SAE offload changes assumed a handshake object would
exist in netdev, which is not the case for open networks.
This commit is contained in:
James Prestwood 2021-03-22 15:20:52 -07:00 committed by Denis Kenzior
parent 0b38aabde3
commit 73b247d72f
1 changed files with 1 additions and 1 deletions

View File

@ -1213,7 +1213,7 @@ static void netdev_connect_ok(struct netdev *netdev)
}
/* Allow station to sync the PSK to disk */
if (netdev->handshake->offload)
if (netdev->handshake && netdev->handshake->offload)
handshake_event(netdev->handshake,
HANDSHAKE_EVENT_SETTING_KEYS);