Index: tools/gn/functions.cc |
diff --git a/tools/gn/functions.cc b/tools/gn/functions.cc |
index faa7437690eff124487acd73d90a128dba7e0570..f02c7e80a16938a1871fdf81378718d20b1cf0ca 100644 |
--- a/tools/gn/functions.cc |
+++ b/tools/gn/functions.cc |
@@ -774,6 +774,8 @@ Value RunFunction(Scope* scope, |
Value result = found_function->second.executed_block_runner( |
function, args.list_value(), &block_scope, err); |
+ if (err->has_error()) |
+ return Value(); |
if (!block_scope.CheckForUnusedVars(err)) |
return Value(); |