Skip to content
Permalink
Browse files Browse the repository at this point in the history
Prevent null pointer dereference in mutable_graph_view
PiperOrigin-RevId: 409684472
Change-Id: I577eb9d9ac470fcec0501423171e739a4ec0cb5c
  • Loading branch information
mihaimaruseac authored and tensorflower-gardener committed Nov 13, 2021
1 parent 0a365c0 commit 045deec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tensorflow/core/grappler/mutable_graph_view.cc
Expand Up @@ -68,6 +68,9 @@ bool IsIdentityConsumingSwitch(const MutableGraphView& graph,
}

NodeDef* input_node = graph.GetNode(tensor_id.node());
if (input_node == nullptr) {
return false;
}
return IsSwitch(*input_node);
}
return false;
Expand Down

0 comments on commit 045deec

Please sign in to comment.