gears.color: Handle nil arguments correctly again

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2014-04-03 20:27:45 +02:00
parent 1e442c97c8
commit 927c92bdfb
1 changed files with 2 additions and 1 deletions

View File

@ -187,7 +187,8 @@ function color.create_pattern(col)
if cairo.Pattern:is_type_of(col) then
return col
end
local result = col and pattern_cache[col]
local col = col or "#000000"
local result = pattern_cache[col]
if result then
return result
end