summaryrefslogtreecommitdiff
path: root/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
diff options
context:
space:
mode:
authorMatthew Olsson <matthewcolsson@gmail.com>2022-03-30 18:08:02 -0700
committerAndreas Kling <kling@serenityos.org>2022-03-31 18:10:45 +0200
commit698fb3957aab3d96b25066a81870032da5b6c613 (patch)
tree37cbfaa81325140558da9aee9c2060b323901f1a /Userland/Applications/PDFViewer/PDFViewerWidget.cpp
parentb69488031b82eb6c7497b13db68834e41a69074a (diff)
downloadserenity-698fb3957aab3d96b25066a81870032da5b6c613.zip
LibPDF: Fix security-handler-related nullptr regression
Diffstat (limited to 'Userland/Applications/PDFViewer/PDFViewerWidget.cpp')
-rw-r--r--Userland/Applications/PDFViewer/PDFViewerWidget.cpp2
1 files changed, 1 insertions, 1 deletions
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();
}