beautiful: Reset theme when theme loading fails (#1470)

Commit c50d62749b added an empty table as a default theme. However,
when loading the actual theme fails, we will end up with theme having
value nil. This commit fixes this by reverting back to an empty table.

Fixes: https://github.com/awesomeWM/awesome/issues/1417
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2017-01-25 23:06:15 +01:00 committed by Daniel Hahler
parent e2edabb8b1
commit c2759077d6
1 changed files with 1 additions and 0 deletions

View File

@ -196,6 +196,7 @@ function beautiful.init(config)
if theme.font then set_font(theme.font) end
else
theme = {}
return gears_debug.print_error("beautiful: error loading theme file " .. config)
end
else