summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authornc-x <neelesh.chandola@outlook.com>2019-08-18 17:46:51 +0530
committerAndreas Rumpf <rumpf_a@web.de>2019-08-18 14:16:51 +0200
commitac7a3651379f0601f9bbf5b1d613c8d6eb89cf4c (patch)
tree0baff48b72ae27302e52166f1ab49e105508ebd9 /lib
parentd5840e1e3d186a3b54859f3b1609b96975748372 (diff)
downloadNim-ac7a3651379f0601f9bbf5b1d613c8d6eb89cf4c.tar.gz
Fix HCR crash because certain procs were hcrGetProc'ed before being hcrRegisterProc'ed (#11971)
Diffstat (limited to 'lib')
-rw-r--r--lib/nimhcr.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/nimhcr.nim b/lib/nimhcr.nim
index 26b570b62..79f3fd350 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,