summary refs log tree commit diff stats
path: root/rod/evals.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-04-05 01:45:28 +0200
committerAraq <rumpf_a@web.de>2011-04-05 01:45:28 +0200
commit997e7d1e5b50597489360222bc16ccf1880875a2 (patch)
treead8bf66b5159cebf6ae193c6fe1c2b584b3227f5 /rod/evals.nim
parentecb3590102a6ee5a77d52075e136337c9ec6c4c5 (diff)
downloadNim-997e7d1e5b50597489360222bc16ccf1880875a2.tar.gz
bugfix: tmacros1.nim works
Diffstat (limited to 'rod/evals.nim')
-rwxr-xr-xrod/evals.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/rod/evals.nim b/rod/evals.nim
index 31c0e629a..29f77aeda 100755
--- a/rod/evals.nim
+++ b/rod/evals.nim
@@ -303,7 +303,8 @@ proc evalVariable(c: PStackFrame, sym: PSym, flags: TEvalFlags): PNode =
       if result == nil: result = emptyNode
       return
     result = IdNodeTableGet(x.mapping, sym)
-    if not aliasNeeded(result, flags): result = copyTree(result)
+    if result != nil and not aliasNeeded(result, flags): 
+      result = copyTree(result)
     if result != nil: return 
     x = x.next
   result = emptyNode