# HG changeset patch # User Matthew Wild # Date 1327276759 0 # Node ID 316e2b09a562ada0afb51e09fcc42953219a14cf # Parent db27a4c18b6a900585a722db4acf2fb634724ef8 util.set: Accept nil to add_list() diff -r db27a4c18b6a -r 316e2b09a562 util/set.lua --- a/util/set.lua Sun Jan 22 23:57:13 2012 +0000 +++ b/util/set.lua Sun Jan 22 23:59:19 2012 +0000 @@ -82,8 +82,10 @@ end function set:add_list(list) - for _, item in ipairs(list) do - items[item] = true; + if list then + for _, item in ipairs(list) do + items[item] = true; + end end end