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; }