diff --git a/Userland/Libraries/LibPDF/Document.cpp b/Userland/Libraries/LibPDF/Document.cpp index 6bda120e87..5b73431530 100644 --- a/Userland/Libraries/LibPDF/Document.cpp +++ b/Userland/Libraries/LibPDF/Document.cpp @@ -418,6 +418,10 @@ PDFErrorOr Document::build_outline() PDFErrorOr Document::create_destination_from_parameters(NonnullRefPtr array, HashMap const& page_number_by_index_ref) { auto page_ref = array->at(0); + + if (page_ref.has()) + return Destination { Destination::Type::XYZ, {}, {} }; + auto type_name = TRY(array->get_name_at(this, 1))->name(); Vector> parameters;