From c7ea60d1abd65d5c85fc5e690a28935c9b4a2dec Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 14 Jun 2017 10:41:42 -0700 Subject: QWizard: Fix null pointer dereference if no pixmap was set The pixmap may be set in QWizardPrivate::updateLayout() if there's a side widget or a watermark. If neither exists, then no pixmap is set and this would cause a crash. Task-number: QTBUG-61423 Change-Id: Ia53158e207a94bf49489fffd14c80dd93415dd0f Reviewed-by: Timur Pocheptsov --- src/widgets/dialogs/qwizard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 432b6f1879..4d89cd9936 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -450,7 +450,7 @@ public: } QSize minimumSizeHint() const Q_DECL_OVERRIDE { - if (!pixmap() && !pixmap()->isNull()) + if (pixmap() && !pixmap()->isNull()) return pixmap()->size(); return QFrame::minimumSizeHint(); } -- cgit v1.2.3