mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-11-17 23:58:27 +01:00
Fix crash if metarule not found
This commit is contained in:
parent
ae557d1cd4
commit
b3f3692622
@ -91,7 +91,13 @@ end
|
||||
|
||||
function mesecon:rule2meta(findrule, allrules)
|
||||
local index = mesecon:rule2metaindex(findrule, allrules)
|
||||
if index == nil then return allrules end
|
||||
if index == nil then
|
||||
if allrules[1].x then
|
||||
return allrules
|
||||
else
|
||||
return {}
|
||||
end
|
||||
end
|
||||
return allrules[index]
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user