diff --git a/widgets/gmail.lua b/widgets/gmail.lua index dbd7d19..84f2125 100644 --- a/widgets/gmail.lua +++ b/widgets/gmail.lua @@ -44,6 +44,10 @@ local function worker(format, warg) -- Could be huge don't read it all at once, info we are after is at the top local xml = f:read(2000) + if xml ~= nil then + return mail + end + mail["{count}"] = -- Count comes before messages and matches at least 0 tonumber(string.match(xml, "([%d]+)")) or mail["{count}"]