kindle: fix possible crash when not connected to a network but wifi is on (#15519)

This commit is contained in:
Benoit Pierre authored and GitHub committed 2026-06-18 13:26:55 +02:00
1 parent 33b7143223
commit cdd94c6f8d
1 file changed
+2 -2
+2 -2
View File
@@ -500,8 +500,8 @@ function Kindle:initNetworkManager(NetworkMgr)
signal_level = string.format("%d/%d", network.signal, network.signal_max),
signal_quality = qualities[network.signal],
-- See comment above about netid being unfortunately optional...
connected = (current_profile.netid and current_profile.netid ~= -1 and current_profile.netid == network.netid)
or (current_profile.netid == nil and current_profile.essid ~= "" and current_profile.essid == network.essid),
connected = current_profile and ((current_profile.netid and current_profile.netid ~= -1 and current_profile.netid == network.netid)
or (current_profile.netid == nil and current_profile.essid ~= "" and current_profile.essid == network.essid)),
flags = network.key_mgmt,
ssid = network.essid ~= "" and network.essid,
password = password,