awful.tag: fix new when layout is nil

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-10-26 11:11:17 +01:00
parent a4f8935509
commit 7f7ffca497
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ function new(names, screen, layout)
if id == 1 then
tags[#tags].selected = true
end
setproperty(tags[#tags], "layout", layout[#tags] or layout[1] or layout)
setproperty(tags[#tags], "layout", layout and (layout[#tags] or layout[1]) or layout)
end
return tags
end