- const Node* NextNode = &getNode(ChooseEdge(CurNode->OutEdges, InLangs,
- CurNode->Name())->ToolName());
- PassThroughGraph(sys::Path(CurAction.OutFile()), NextNode,
- InLangs, TempDir, LangMap);
+ const Edge* Edg = ChooseEdge(CurNode->OutEdges, InLangs, CurNode->Name());
+ if (Edg == 0)
+ return 1;
+
+ const Node* NextNode = getNode(Edg->ToolName());
+ if (NextNode == 0)
+ return 1;
+
+ if (int ret = PassThroughGraph(sys::Path(CurAction.OutFile()), NextNode,
+ InLangs, TempDir, LangMap)) {
+ return ret;
+ }
+ }
+
+ if (!WasSomeActionGenerated) {
+ PrintError("no input files");
+ return 1;