mirror of
https://github.com/minetest-mods/MoreMesecons.git
synced 2024-12-28 08:27:29 +01:00
Fix possible crash and wireless receptors in unloaded map blocks (#22)
Co-authored-by: sys4 <bricassa@sys4.fr>
This commit is contained in:
parent
74a95e559e
commit
1dab017abe
@ -262,6 +262,9 @@ local function on_digiline_receive(pos, node, channel, msg)
|
||||
end
|
||||
|
||||
local wls = moremesecons.get_data_from_pos(wireless_meta, pos)
|
||||
if not wls then
|
||||
return
|
||||
end
|
||||
|
||||
if wls.owner == "" or not wireless[wls.owner] or channel == "" or not wireless[wls.owner][wls.channel] then
|
||||
return
|
||||
@ -274,7 +277,7 @@ local function on_digiline_receive(pos, node, channel, msg)
|
||||
|
||||
sending_digilines[pos_hash] = true
|
||||
for i, wl_pos in pairs(wireless[wls.owner][wls.channel].members) do
|
||||
if i ~= wls.id and check_wireless_exists(wl_pos) then
|
||||
if i ~= wls.id then
|
||||
digiline:receptor_send(wl_pos, digiline.rules.default, channel, msg)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user