summaryrefslogtreecommitdiff
path: root/runtime/class_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/class_table.cc')
-rw-r--r--runtime/class_table.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/class_table.cc b/runtime/class_table.cc
index b44104e299..0fcce6b307 100644
--- a/runtime/class_table.cc
+++ b/runtime/class_table.cc
@@ -170,7 +170,7 @@ bool ClassTable::InsertStrongRoot(ObjPtr<mirror::Object> obj) {
const DexFile* dex_file = ObjPtr<mirror::DexCache>::DownCast(obj)->GetDexFile();
if (dex_file != nullptr && dex_file->GetOatDexFile() != nullptr) {
const OatFile* oat_file = dex_file->GetOatDexFile()->GetOatFile();
- if (!oat_file->GetBssGcRoots().empty()) {
+ if (oat_file != nullptr && !oat_file->GetBssGcRoots().empty()) {
InsertOatFileLocked(oat_file); // Ignore return value.
}
}