Commit 568f11b0 authored by Harald Sitter's avatar Harald Sitter 🌹
Browse files

don't crash on nullptr pdfOptionsPage

Summary:
same as in fbeff5ae there may not be
a pdfOptionsPage when using print preview.

this fixes an exciting crash on our windows build when trying to print
preview

Test Plan: can't easily build on windows but the traceback definitely falls over 0x0000 on that line, so given context I am confident this fixes the crash

Reviewers: aacid

Reviewed By: aacid

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D24696
parent 8b107e99
Pipeline #9272 passed with stage
in 14 minutes and 13 seconds
......@@ -1362,8 +1362,11 @@ bool PDFGenerator::print( QPrinter& printer )
{
#endif
if ( pdfOptionsPage )
{
// If requested, scale to full page instead of the printable area
printer.setFullPage( pdfOptionsPage->ignorePrintMargins() );
}
QPainter painter;
painter.begin(&printer);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment