Add null check before calling node.op_->Deprecated(). (#211)

This commit is contained in:
Bowen Bao 2018-12-19 11:43:36 -08:00 committed by Ke Zhang
parent ac3a081ec5
commit 4d010fb1ea

View file

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