diff options
| author | 2014-10-08 17:20:22 +0000 | |
|---|---|---|
| committer | 2014-10-08 17:20:23 +0000 | |
| commit | 254aa0d3f58b56b227077ef32b4606ebc25eaae4 (patch) | |
| tree | c8563c3790df02bfcf6442e50e3263f94a39abd1 /compiler/dex/mir_optimization.cc | |
| parent | 1293b6b2adba33e8b5eca5632dd90c9835b2ef42 (diff) | |
| parent | 8ac41af13c8e48ede6a7c8a3bf2fb1a414326038 (diff) | |
Merge "ART: Fix SelectKind to work with nullptr"
Diffstat (limited to 'compiler/dex/mir_optimization.cc')
| -rw-r--r-- | compiler/dex/mir_optimization.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/dex/mir_optimization.cc b/compiler/dex/mir_optimization.cc index dac71f6aa7..20bc220465 100644 --- a/compiler/dex/mir_optimization.cc +++ b/compiler/dex/mir_optimization.cc @@ -186,6 +186,10 @@ static MIR* FindPhi(BasicBlock* bb, int ssa_name) { } static SelectInstructionKind SelectKind(MIR* mir) { + // Work with the case when mir is nullptr. + if (mir == nullptr) { + return kSelectNone; + } switch (mir->dalvikInsn.opcode) { case Instruction::MOVE: case Instruction::MOVE_OBJECT: |