util/async.lua
changeset 10935 558f0555ba02
parent 10934 69a4b0e3565f
child 11965 542a9a503073
--- a/util/async.lua	Sun Jun 14 08:49:32 2020 +0100
+++ b/util/async.lua	Sun Jun 14 09:40:08 2020 +0100
@@ -160,7 +160,7 @@
 	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");