From ac7a3651379f0601f9bbf5b1d613c8d6eb89cf4c Mon Sep 17 00:00:00 2001 From: nc-x Date: Sun, 18 Aug 2019 17:46:51 +0530 Subject: [PATCH] Fix HCR crash because certain procs were hcrGetProc'ed before being hcrRegisterProc'ed (#11971) --- lib/nimhcr.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nimhcr.nim b/lib/nimhcr.nim index 26b570b625..79f3fd350e 100644 --- a/lib/nimhcr.nim +++ b/lib/nimhcr.nim @@ -347,7 +347,7 @@ when defined(createNimHcr): proc hcrGetProc*(module: cstring, name: cstring): pointer {.nimhcr.} = trace " get proc: ", module.sanitize, " ", name - return modules[$module].procs[$name].jump + return modules[$module].procs.getOrDefault($name, ProcSym()).jump proc hcrRegisterGlobal*(module: cstring, name: cstring,