diff options
Diffstat (limited to 'patchoat/patchoat.cc')
-rw-r--r-- | patchoat/patchoat.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc index d836532ed2..7e4ce917db 100644 --- a/patchoat/patchoat.cc +++ b/patchoat/patchoat.cc @@ -547,6 +547,9 @@ void PatchOat::PatchInternedStrings(const ImageHeader* image_header) { void PatchOat::PatchClassTable(const ImageHeader* image_header) { const auto& section = image_header->GetImageSection(ImageHeader::kSectionClassTable); + if (section.Size() == 0) { + return; + } // Note that we require that ReadFromMemory does not make an internal copy of the elements. // This also relies on visit roots not doing any verification which could fail after we update // the roots to be the image addresses. |