mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
LibPDF: Use resolve_to on /Dests entry
Fixes an assertion if /Dests is an indirect object (`24 0 R`) instead of an inline dictionary.
This commit is contained in:
parent
8c3478a921
commit
fbd00d9c8e
1 changed files with 1 additions and 1 deletions
|
@ -502,7 +502,7 @@ PDFErrorOr<Destination> Document::create_destination_from_object(NonnullRefPtr<O
|
|||
else
|
||||
dest_name = dest_obj->cast<StringObject>()->string();
|
||||
if (auto dests_value = m_catalog->get(CommonNames::Dests); dests_value.has_value()) {
|
||||
auto dests = dests_value.value().get<NonnullRefPtr<Object>>()->cast<DictObject>();
|
||||
auto dests = TRY(resolve_to<DictObject>(dests_value.value()));
|
||||
auto entry = MUST(dests->get_object(this, dest_name));
|
||||
return TRY(create_destination_from_dictionary_entry(entry, page_number_by_index_ref));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue