From 020454b7a3afe41edcc365f593bffc97c827e962 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 14 Jun 2020 09:40:08 +0100 Subject: util.async: Don't attempt to close thread if not created yet --- util/async.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/async.lua') diff --git a/util/async.lua b/util/async.lua index 24378d8c..341128d2 100644 --- a/util/async.lua +++ b/util/async.lua @@ -160,7 +160,7 @@ function runner_mt:run(input) local q, thread = self.queue, self.thread; if not thread or coroutine.status(thread) == "dead" then --luacheck: ignore 143/coroutine - if coroutine.close then + if thread and coroutine.close then coroutine.close(thread); end self:log("debug", "creating new coroutine"); -- cgit v1.2.3