Take into account that we might end up with unresolved classes.

bug:22821472
Change-Id: I615ab0b41c8cadae9f327e07dcff71755f7146c2
diff --git a/compiler/optimizing/reference_type_propagation.cc b/compiler/optimizing/reference_type_propagation.cc
index f747fc5..d1c1134 100644
--- a/compiler/optimizing/reference_type_propagation.cc
+++ b/compiler/optimizing/reference_type_propagation.cc
@@ -440,8 +440,10 @@
       Runtime::Current()->GetClassLinker()->FindDexCache(instr->GetDexFile());
   // Get type from dex cache assuming it was populated by the verifier.
   mirror::Class* resolved_class = dex_cache->GetResolvedType(instr->GetTypeIndex());
-  DCHECK(resolved_class != nullptr);
-  ReferenceTypeInfo::TypeHandle handle = handles_->NewHandle(resolved_class);
+  // TODO: investigating why we are still getting unresolved classes: b/22821472.
+  ReferenceTypeInfo::TypeHandle handle = (resolved_class != nullptr)
+    ? handles_->NewHandle(resolved_class)
+    : object_class_handle_;
   instr->SetLoadedClassRTI(ReferenceTypeInfo::Create(handle, /* is_exact */ true));
   instr->SetReferenceTypeInfo(ReferenceTypeInfo::Create(class_class_handle_, /* is_exact */ true));
 }