Index: tools/gn/parse_tree.cc |
diff --git a/tools/gn/parse_tree.cc b/tools/gn/parse_tree.cc |
index 59b39f36cee9d90f1f075b7e7022b62ba74b0c4a..c4f78b7ce0768f9f7e7d025d112e1e25c7c31930 100644 |
--- a/tools/gn/parse_tree.cc |
+++ b/tools/gn/parse_tree.cc |
@@ -340,6 +340,8 @@ Value FunctionCallNode::Execute(Scope* scope, Err* err) const { |
} |
LocationRange FunctionCallNode::GetRange() const { |
+ if (function_.type() == Token::INVALID) |
+ return LocationRange(); // This will be null in some tests. |
if (block_) |
return function_.range().Union(block_->GetRange()); |
return function_.range().Union(args_->GetRange()); |