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 7967d05915
commit ed6d5e0246
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 if cairo.Pattern:is_type_of(col) then
return col return col
end end
local result = col and pattern_cache[col] local col = col or "#000000"
local result = pattern_cache[col]
if result then if result then
return result return result
end end