Browse Source

Add nil check on ast.walk

gingerBill 3 years ago
parent
commit
d9ca4eb4d6
1 changed files with 4 additions and 1 deletions
  1. 4 1
      core/odin/ast/walk.odin

+ 4 - 1
core/odin/ast/walk.odin

@@ -52,8 +52,11 @@ walk :: proc(v: ^Visitor, node: ^Node) {
 		}
 		}
 	}
 	}
 
 
-
 	v := v
 	v := v
+	if v == nil || node == nil {
+		return
+	}
+
 	if v = v->visit(node); v == nil {
 	if v = v->visit(node); v == nil {
 		return
 		return
 	}
 	}