From b3f36926228d78d34feaafb134276b122c61b204 Mon Sep 17 00:00:00 2001 From: Novatux Date: Sat, 4 Jan 2014 16:51:52 +0100 Subject: [PATCH] Fix crash if metarule not found --- mesecons/util.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mesecons/util.lua b/mesecons/util.lua index 9e22935..b3ca7a0 100644 --- a/mesecons/util.lua +++ b/mesecons/util.lua @@ -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