Skip to content

Commit

Permalink
Add nullptr check
Browse files Browse the repository at this point in the history
Adding a nullptr check before dereferencing in case q is null.

Change-Id: Ia440e2ed41cbaf06a5919930c2e1615bb3916ff3
Reviewed-by: Volker Hilsheimer <[email protected]>
(cherry picked from commit 57f752b)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
  • Loading branch information
Oliver Eftevaag authored and Qt Cherry-pick Bot committed Mar 30, 2021
1 parent fd2fa0e commit 117e0a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/printsupport/dialogs/qprintdialog_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,8 @@ void QUnixPrintWidgetPrivate::updateWidget()
widget.lOutput->setVisible(printToFile);
widget.fileBrowser->setVisible(printToFile);

widget.properties->setVisible(q->testOption(QAbstractPrintDialog::PrintShowPageSize));
if (q)
widget.properties->setVisible(q->testOption(QAbstractPrintDialog::PrintShowPageSize));
}

QUnixPrintWidgetPrivate::~QUnixPrintWidgetPrivate()
Expand Down

0 comments on commit 117e0a4

Please sign in to comment.