summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@theqtcompany.com>2014-12-02 23:28:59 +0100
committerNiels Weber <niels.weber@theqtcompany.com>2014-12-03 10:04:38 +0100
commitb8ac163c422b3d8f12d91b92f126a631449a2232 (patch)
tree7b75116540c43062d2cd5de1e160f14152748745 /src
parentddb177d0ce885ae32585f3d9864d6ca02807810c (diff)
Fix possible null pointer access.
Task-number: QTIFW-593 Change-Id: I583cf4cb63abc9ecad9acf09b5573d380d852b30 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/libs/installer/packagemanagergui.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index a09f8090d..e3dc65d58 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -985,8 +985,10 @@ bool IntroductionPage::validatePage()
}
#ifdef Q_OS_WIN
- if (!m_taskButton->window())
- m_taskButton->setWindow(QApplication::activeWindow()->windowHandle());
+ if (!m_taskButton->window()) {
+ if (QWidget *widget = QApplication::activeWindow())
+ m_taskButton->setWindow(widget->windowHandle());
+ }
m_taskButton->progress()->reset();
m_taskButton->progress()->resume();