!10081 add check for inputs size of return node in dump

From: @zhangbuxue
Reviewed-by: 
Signed-off-by:
This commit is contained in:
mindspore-ci-bot 2020-12-18 09:35:25 +08:00 committed by Gitee
commit dbc93d7872
1 changed files with 3 additions and 0 deletions

View File

@ -481,6 +481,9 @@ void ProtoExporter::ExportFuncGraphOutput(const FuncGraphPtr &func_graph, const
if (ret_node == nullptr || !ret_node->isa<CNode>()) {
MS_LOG(EXCEPTION) << "Graph return node is illegal";
}
if (ret_node->inputs().size() != 2) {
return;
}
AnfNodePtr arg = ret_node->input(1);
if (graph_proto == nullptr) {
MS_LOG(EXCEPTION) << "graph_proto is nullptr";