diff options
author | Sebastien Hertz <shertz@google.com> | 2014-06-06 07:02:39 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-06-06 07:02:41 +0000 |
commit | 7a6b77f9a694ea4569fbf44493fdcaeea237a8be (patch) | |
tree | 6e1d4f1f4a9cf5de07395e3547f97849bf73163a /runtime/mirror/class.cc | |
parent | 25c4f6a25b3de9b9d7ca5162f1629753a0b7f003 (diff) | |
parent | 4206eb5d86d3a2406361e59b2018152b2485cced (diff) | |
download | art-7a6b77f9a694ea4569fbf44493fdcaeea237a8be.zip art-7a6b77f9a694ea4569fbf44493fdcaeea237a8be.tar.gz art-7a6b77f9a694ea4569fbf44493fdcaeea237a8be.tar.bz2 |
Merge "Fix crash in JDWP ReferenceType.SourceFile command"
Diffstat (limited to 'runtime/mirror/class.cc')
-rw-r--r-- | runtime/mirror/class.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index 4b02c0f..42ef68a 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -771,7 +771,10 @@ const char* Class::GetSourceFile() { std::string descriptor(GetDescriptor()); const DexFile& dex_file = GetDexFile(); const DexFile::ClassDef* dex_class_def = GetClassDef(); - CHECK(dex_class_def != nullptr) << "No class def for class " << PrettyClass(this); + if (dex_class_def == nullptr) { + // Generated classes have no class def. + return nullptr; + } return dex_file.GetSourceFile(*dex_class_def); } |