Fix crash if metarule not found

This commit is contained in:
Novatux 2014-01-04 16:51:52 +01:00
parent ae557d1cd4
commit b3f3692622

@ -91,7 +91,13 @@ end
function mesecon:rule2meta(findrule, allrules) function mesecon:rule2meta(findrule, allrules)
local index = mesecon:rule2metaindex(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] return allrules[index]
end end