Skip to content

Commit c3cd8c3

Browse files
committed
fix null SSID crash
tadasr#21
1 parent bdfba56 commit c3cd8c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/src/main/java/com/tadasr/IOTWifi/IOTWifiModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ private WifiConfiguration getExistingNetworkConfig(String ssid) {
253253
String comparableSSID = ('"' + ssid + '"'); // Add quotes because wifiConfig.SSID has them
254254
if (configList != null) {
255255
for (WifiConfiguration wifiConfig : configList) {
256-
if (wifiConfig.SSID.equals(comparableSSID)) {
256+
if (wifiConfig.SSID != null && wifiConfig.SSID.equals(comparableSSID)) {
257257
Log.d("IoTWifi", "Found Matching Wifi: "+ wifiConfig.toString());
258258
existingNetworkConfigForSSID = wifiConfig;
259259
break;

0 commit comments

Comments
 (0)