ART: Fix underflow in codegen

Check for count == 0 first before accessing non-existent stack map.

Test: m ART_TEST_JIT=true test-art-host
Test: m ART_TEST_JIT=true test-art-host-run-test-913-heaps
Change-Id: Id4cad8e791d731147860b8a9a0d90cc893cc6972
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index 8dd423f..424b850 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -861,8 +861,11 @@
 bool CodeGenerator::HasStackMapAtCurrentPc() {
   uint32_t pc = GetAssembler()->CodeSize();
   size_t count = stack_map_stream_.GetNumberOfStackMaps();
+  if (count == 0) {
+    return false;
+  }
   CodeOffset native_pc_offset = stack_map_stream_.GetStackMap(count - 1).native_pc_code_offset;
-  return (count > 0) && (native_pc_offset.Uint32Value(GetInstructionSet()) == pc);
+  return (native_pc_offset.Uint32Value(GetInstructionSet()) == pc);
 }
 
 void CodeGenerator::MaybeRecordNativeDebugInfo(HInstruction* instruction,