From c782f7d775b6fe8784e1b339e9a0d6e522a2357f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Le=20Corre?= Date: Wed, 13 Jan 2021 04:09:47 +0100 Subject: [PATCH] Validate function before callback. Fixes #482 --- widget/fs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/fs.lua b/widget/fs.lua index 48d80b7..b3a2dad 100644 --- a/widget/fs.lua +++ b/widget/fs.lua @@ -137,7 +137,7 @@ local function factory(args) function fs.update(callback) Gio.Async.start(gears.protected_call.call)(function() update_synced() - if callback then + if type(callback) == "function" and callback then callback() end end)