From fa0d05aa95f8f37efb54cbdd4f01516988ed9c6a Mon Sep 17 00:00:00 2001 From: luke bonham Date: Fri, 3 Jul 2015 18:10:03 +0200 Subject: [PATCH] weather.forecast_update: forgot to add check on err --- widgets/weather.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/weather.lua b/widgets/weather.lua index c69d02b..7223c29 100644 --- a/widgets/weather.lua +++ b/widgets/weather.lua @@ -75,7 +75,7 @@ local function worker(args) f:close() weather_now, pos, err = json.decode(j, 1, nil) - if not err and tonumber(weather_now["cod"]) == 200 then + if not err and weather_now ~= nil and tonumber(weather_now["cod"]) == 200 then weather.notification_text = '' for i = 1, weather_now["cnt"] do local f = assert(io.popen(string.format(date_cmd, weather_now["list"][i]["dt"]))) -- 2.39.2