diff --git a/asyncdispatch2.nimble b/asyncdispatch2.nimble index a48cdd30..1d42df5d 100644 --- a/asyncdispatch2.nimble +++ b/asyncdispatch2.nimble @@ -1,5 +1,5 @@ packageName = "asyncdispatch2" -version = "2.1.5" +version = "2.1.6" author = "Status Research & Development GmbH" description = "Asyncdispatch2" license = "Apache License 2.0 or MIT" diff --git a/asyncdispatch2/asyncloop.nim b/asyncdispatch2/asyncloop.nim index e88a0102..b1d487b7 100644 --- a/asyncdispatch2/asyncloop.nim +++ b/asyncdispatch2/asyncloop.nim @@ -234,7 +234,8 @@ template processCallbacks(loop: untyped) = # can be generated. if len(loop.callbacks) == 0: break let callable = loop.callbacks.popFirst() - callable.function(callable.udata) + if not isNil(callable.function): + callable.function(callable.udata) when defined(windows) or defined(nimdoc): import winlean, sets, hashes