We use NULL to mean "unknown source", but you can't pass NULL to C string functions.

Found by the stability monkeys.

Bug: 5880980
Change-Id: I2775024a5038d3716f4e7c6beac02c3f5e0a3f3a
diff --git a/src/object_utils.h b/src/object_utils.h
index 0412858..3af7007 100644
--- a/src/object_utils.h
+++ b/src/object_utils.h
@@ -169,11 +169,8 @@
     std::string descriptor(GetDescriptor());
     const DexFile& dex_file = GetDexFile();
     const DexFile::ClassDef* dex_class_def = dex_file.FindClassDef(descriptor);
-    if (dex_class_def == NULL) {
-      return NULL;
-    } else {
-      return dex_file.GetSourceFile(*dex_class_def);
-    }
+    CHECK(dex_class_def != NULL);
+    return dex_file.GetSourceFile(*dex_class_def);
   }
 
   std::string GetLocation() {
@@ -477,11 +474,8 @@
     const char* descriptor = GetDeclaringClassDescriptor();
     const DexFile& dex_file = GetDexFile();
     const DexFile::ClassDef* dex_class_def = dex_file.FindClassDef(descriptor);
-    if (dex_class_def == NULL) {
-      return NULL;
-    } else {
-      return dex_file.GetSourceFile(*dex_class_def);
-    }
+    CHECK(dex_class_def != NULL);
+    return dex_file.GetSourceFile(*dex_class_def);
   }
   bool IsStatic() {
     return method_->IsStatic();