Fix removeReader/removeWriter can produce SIGSEGV.

This commit is contained in:
cheatfate 2018-12-12 13:07:41 +02:00
parent 0767aaeb37
commit 6aaa96569f
2 changed files with 3 additions and 2 deletions

View File

@ -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"

View File

@ -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