diff options
Diffstat (limited to 'compiler/image_writer.cc')
-rw-r--r-- | compiler/image_writer.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index f395428c7d..1612f7eb33 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -85,6 +85,10 @@ bool ImageWriter::Write(const std::string& image_filename, return false; } oat_file_ = OatFile::OpenWritable(oat_file.get(), oat_location); + if (oat_file_ == NULL) { + LOG(ERROR) << "Failed to open writable oat file " << oat_filename << " for " << oat_location; + return false; + } class_linker->RegisterOatFile(*oat_file_); interpreter_to_interpreter_entry_offset_ = oat_file_->GetOatHeader().GetInterpreterToInterpreterEntryOffset(); interpreter_to_quick_entry_offset_ = oat_file_->GetOatHeader().GetInterpreterToQuickEntryOffset(); |