diff options
author | 2017-04-25 15:17:16 -0700 | |
---|---|---|
committer | 2017-04-26 10:40:05 -0700 | |
commit | 72155d2f05e38b265cb79a31abdbe65cd29d3a5b (patch) | |
tree | b699f16d33985384efa8494ba93866298c59c46b /compiler/optimizing | |
parent | 0d2ea2f09937e55600f8a1eda6b102fef1ab9c0b (diff) |
fix a null pointer dereference
Caught by the static analyzer:
art/compiler/optimizing/graph_checker.cc:501:10: warning: Called C++
object pointer is null [clang-analyzer-core.CallAndMessage]
Bug: None
Test: Still builds; static analyzer no longer complains.
Change-Id: Iba20a0cd859cca0cf38f6e10c3685cc986b5baa5
Diffstat (limited to 'compiler/optimizing')
-rw-r--r-- | compiler/optimizing/graph_checker.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc index 34b52a87b5..12340b416d 100644 --- a/compiler/optimizing/graph_checker.cc +++ b/compiler/optimizing/graph_checker.cc @@ -497,8 +497,7 @@ void GraphChecker::VisitInvokeStaticOrDirect(HInvokeStaticOrDirect* invoke) { "has a null pointer as last input.", invoke->DebugName(), invoke->GetId())); - } - if (!last_input->IsClinitCheck() && !last_input->IsLoadClass()) { + } else if (!last_input->IsClinitCheck() && !last_input->IsLoadClass()) { AddError(StringPrintf("Static invoke %s:%d marked as having an explicit clinit check " "has a last instruction (%s:%d) which is neither a clinit check " "nor a load class instruction.", |