summary refs log tree commit diff stats
path: root/compiler/renderer.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/renderer.nim')
-rwxr-xr-xcompiler/renderer.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/renderer.nim b/compiler/renderer.nim
index d26896b8e..6fb5da2a9 100755
--- a/compiler/renderer.nim
+++ b/compiler/renderer.nim
@@ -322,6 +322,7 @@ proc lsons(n: PNode, start: int = 0, theEnd: int = - 1): int =
   
 proc lsub(n: PNode): int = 
   # computes the length of a tree
+  if isNil(n): return 0
   if n.comment != nil: return maxLineLen + 1
   case n.kind
   of nkEmpty: result = 0
@@ -663,6 +664,7 @@ proc gident(g: var TSrcGen, n: PNode) =
   if n.kind == nkSym and renderIds in g.flags: put(g, tkIntLit, $n.sym.id)
   
 proc gsub(g: var TSrcGen, n: PNode, c: TContext) = 
+  if isNil(n): return
   var 
     L: int
     a: TContext