mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-03-14 23:09:45 +01:00
wifi-scripts: netifd: fix null dereference in config_init for missing devices
Add optional chaining when accessing device config in the wifi-iface
loop to handle cases where a referenced device doesn't exist.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 8b994ed397)
This commit is contained in:
parent
3e3f325063
commit
f867497e35
1 changed files with 1 additions and 1 deletions
|
|
@ -133,7 +133,7 @@ function config_init(uci)
|
|||
let mlo_vif = parse_bool(data.mlo);
|
||||
let radios = map(dev_names, (v) => radio_idx[v]);
|
||||
radios = filter(radios, (v) => v != null);
|
||||
let radio_config = map(dev_names, (v) => devices[v].config);
|
||||
let radio_config = map(dev_names, (v) => devices[v]?.config);
|
||||
let ifname;
|
||||
let mlo_created = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue