summary refs log tree commit diff stats
path: root/compiler/treetab.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/treetab.nim')
-rw-r--r--compiler/treetab.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/treetab.nim b/compiler/treetab.nim
index 63f3fc6e2..8d66d56c7 100644
--- a/compiler/treetab.nim
+++ b/compiler/treetab.nim
@@ -28,8 +28,9 @@ proc hashTree(n: PNode): THash =
   of nkFloatLit..nkFloat64Lit:
     if (n.floatVal >= - 1000000.0) and (n.floatVal <= 1000000.0): 
       result = result !& toInt(n.floatVal)
-  of nkStrLit..nkTripleStrLit: 
-    result = result !& hash(n.strVal)
+  of nkStrLit..nkTripleStrLit:
+    if not n.strVal.isNil:
+      result = result !& hash(n.strVal)
   else: 
     for i in countup(0, sonsLen(n) - 1): 
       result = result !& hashTree(n.sons[i])