Don't check for if null after already dereferenced
I'm not sure how it could be null at this point (and obviously it is nowhere else we'd have seen failures), but keeping the check as is and just moving it to where it would catch it before dereferencing. PiperOrigin-RevId: 349603765 Change-Id: Ifa792bed92ffd2652c6946d3a48bfb53aafc3477
This commit is contained in:
parent
b982fb9aef
commit
b6f3366a71
@ -55,9 +55,11 @@ Status FunctionDefToBodyHelper(
|
||||
const StackTracesMap& stack_traces =
|
||||
lib_def->GetStackTraces(fdef.signature().name());
|
||||
for (Node* n : graph->nodes()) {
|
||||
auto it = stack_traces.find(n->name());
|
||||
if (n && it != stack_traces.end()) {
|
||||
n->SetStackTrace(it->second);
|
||||
if (n) {
|
||||
auto it = stack_traces.find(n->name());
|
||||
if (it != stack_traces.end()) {
|
||||
n->SetStackTrace(it->second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user