Index: tools/gn/functions_target.cc |
diff --git a/tools/gn/functions_target.cc b/tools/gn/functions_target.cc |
index 8aea0128ad85e2312765fc0d25d5d5103555a935..af548dca0430cb687a871d1603fac085f114cdde 100644 |
--- a/tools/gn/functions_target.cc |
+++ b/tools/gn/functions_target.cc |
@@ -292,6 +292,8 @@ Value RunComponent(Scope* scope, |
TargetGenerator::GenerateTarget(&block_scope, function, args, |
component_mode, err); |
+ if (err->has_error()) |
+ return Value(); |
block_scope.CheckForUnusedVars(err); |
return Value(); |