summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/wifi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 754b8b9b..62d9216b 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -608,7 +608,7 @@ static void ssid_init(GSupplicantSSID *ssid, struct connman_network *network)
ssid->security = network_security(security);
passphrase = connman_network_get_string(network,
"WiFi.Passphrase");
- if (strlen(passphrase) == 0)
+ if (passphrase == NULL || strlen(passphrase) == 0)
ssid->passphrase = NULL;
else
ssid->passphrase = passphrase;