LibPDF: Fix security-handler-related nullptr regression

This commit is contained in:
Matthew Olsson 2022-03-30 18:08:02 -07:00 committed by Andreas Kling
parent b69488031b
commit 698fb3957a
Notes: sideshowbarker 2024-07-17 16:24:15 +09:00

View file

@ -160,7 +160,7 @@ void PDFViewerWidget::open_file(Core::File& file)
auto document = maybe_document.release_value();
if (auto sh = document->security_handler(); !sh->has_user_password()) {
if (auto sh = document->security_handler(); sh && !sh->has_user_password()) {
// FIXME: Prompt the user for a password
VERIFY_NOT_REACHED();
}