diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index 3ef0d9ce3d..417a8634f6 100644 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -341,7 +341,7 @@ when not defined(noSignalHandler): registerSignalHandler() # call it in initialization section -proc setControlCHook(hook: proc () {.noconv.}) = +proc setControlCHook(hook: proc () {.noconv.} not nil) = # ugly cast, but should work on all architectures: type TSignalHandler = proc (sig: cint) {.noconv, benign.} c_signal(SIGINT, cast[TSignalHandler](hook))