From 4d010fb1eabaaa38fcd0939043c4a9e54bca1f78 Mon Sep 17 00:00:00 2001 From: Bowen Bao Date: Wed, 19 Dec 2018 11:43:36 -0800 Subject: [PATCH] Add null check before calling node.op_->Deprecated(). (#211) --- onnxruntime/core/graph/graph.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/graph/graph.cc b/onnxruntime/core/graph/graph.cc index 5547ab9110..38b2df4c78 100644 --- a/onnxruntime/core/graph/graph.cc +++ b/onnxruntime/core/graph/graph.cc @@ -1637,7 +1637,7 @@ Status Graph::VerifyNodeAndOpMatch() { auto maxInclusiveVersion = DomainToVersionMap().find(domain)->second; node.op_ = schema_registry_->GetSchema(node.OpType(), maxInclusiveVersion, node.Domain()); - if (node.op_->Deprecated()) { + if (node.op_ && node.op_->Deprecated()) { node.op_ = nullptr; }