From c3f8bf7b16d36c73925b35ab2d07772f14d95269 Mon Sep 17 00:00:00 2001 From: Mygod Date: Thu, 20 Jun 2019 23:00:59 +0800 Subject: [PATCH] Fix IllegalStateException --- .../vpnhotspot/net/wifi/configuration/WifiConfiguration.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/configuration/WifiConfiguration.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/configuration/WifiConfiguration.kt index 66b36e38..4d4af614 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/configuration/WifiConfiguration.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/configuration/WifiConfiguration.kt @@ -90,7 +90,7 @@ fun WifiConfiguration.toQRString() = StringBuilder("WIFI:").apply { append("S:") append(SSID.sanitize()) append(';') - if (password) { + if (password && preSharedKey != null) { append("P:") append(preSharedKey.sanitize()) append(';')