summaryrefslogtreecommitdiffstats
path: root/tools/assistant
diff options
context:
space:
mode:
authorkh <qtc-committer@nokia.com>2009-04-24 10:59:39 (GMT)
committerkh <qtc-committer@nokia.com>2009-04-24 10:59:39 (GMT)
commitd489dc180c1e71de117e6d015c5645441eb9fb7f (patch)
tree9440ece515109c48e175150ef1394aa8a8626a3f /tools/assistant
parent225b516ea21e841ee52d2f3edb426eb781ab0c8d (diff)
downloadQt-d489dc180c1e71de117e6d015c5645441eb9fb7f.zip
Qt-d489dc180c1e71de117e6d015c5645441eb9fb7f.tar.gz
Qt-d489dc180c1e71de117e6d015c5645441eb9fb7f.tar.bz2
init combobox member and make sure we won't access it uninitialized
Diffstat (limited to 'tools/assistant')
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index 2e39186..6e22413 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -86,6 +86,7 @@ QT_BEGIN_NAMESPACE
MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
: QMainWindow(parent)
+ , m_filterCombo(0)
, m_toolBarMenu(0)
, m_cmdLine(cmdLine)
, m_progressWidget(0)
@@ -217,12 +218,14 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
if (!m_cmdLine->currentFilter().isEmpty()) {
const QString &curFilter = m_cmdLine->currentFilter();
m_helpEngine->setCurrentFilter(curFilter);
- int idx = m_filterCombo->findText(curFilter);
- if (idx >= 0) {
- bool blocked = m_filterCombo->signalsBlocked();
- m_filterCombo->blockSignals(true);
- m_filterCombo->setCurrentIndex(idx);
- m_filterCombo->blockSignals(blocked);
+ if (m_filterCombo) {
+ int idx = m_filterCombo->findText(curFilter);
+ if (idx >= 0) {
+ bool blocked = m_filterCombo->signalsBlocked();
+ m_filterCombo->blockSignals(true);
+ m_filterCombo->setCurrentIndex(idx);
+ m_filterCombo->blockSignals(blocked);
+ }
}
}