diff options
| author | Novatux <nathanael.courant@laposte.net> | 2014-01-04 16:51:52 +0100 | 
|---|---|---|
| committer | Novatux <nathanael.courant@laposte.net> | 2014-01-04 16:51:52 +0100 | 
| commit | b3f36926228d78d34feaafb134276b122c61b204 (patch) | |
| tree | 44ecabda399099e6a48be377df5a6c4f64b36355 | |
| parent | ae557d1cd4d893622c26251ae846a09158c2e420 (diff) | |
Fix crash if metarule not found
| -rw-r--r-- | mesecons/util.lua | 8 | 
1 files changed, 7 insertions, 1 deletions
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  | 
