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(); }