From 698fb3957aab3d96b25066a81870032da5b6c613 Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Wed, 30 Mar 2022 18:08:02 -0700 Subject: [PATCH] LibPDF: Fix security-handler-related nullptr regression --- Userland/Applications/PDFViewer/PDFViewerWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp index 07c9f00b5e..3357a6bff0 100644 --- a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp +++ b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp @@ -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(); }