summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOrgad Shaneh <orgads@gmail.com>2012-06-24 20:30:02 +0300
committerTobias Hunger <tobias.hunger@nokia.com>2012-06-25 10:23:32 +0200
commitdc251deccf41b5436b44fa017374f452df0f1581 (patch)
treed25d6f10f1764b9146137cce81786349709b4a0b /src
parentf930db7e0a38e48a33f56cf7cf92b1be919d21f9 (diff)
downloadqt-creator-dc251deccf41b5436b44fa017374f452df0f1581.tar.gz
Project: Fix crashes
Task-number: QTCREATORBUG-7563 Change-Id: Ib7630e9ca82a0b09703ff948af95af53ced05730 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/projectexplorer/buildsettingspropertiespage.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt4project.cpp19
2 files changed, 11 insertions, 10 deletions
diff --git a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
index 91a693a561..66b4341ed5 100644
--- a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
+++ b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
@@ -226,6 +226,8 @@ void BuildSettingsWidget::updateAddButtonMenu()
this, SLOT(cloneConfiguration()));
}
IBuildConfigurationFactory * factory = IBuildConfigurationFactory::find(m_target);
+ if (!factory)
+ return;
foreach (Core::Id id, factory->availableCreationIds(m_target)) {
QAction *action = m_addButtonMenu->addAction(factory->displayNameForId(id), this, SLOT(createConfiguration()));
action->setData(QVariant::fromValue(id));
diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp
index 54abc51f7e..d552591754 100644
--- a/src/plugins/qt4projectmanager/qt4project.cpp
+++ b/src/plugins/qt4projectmanager/qt4project.cpp
@@ -924,17 +924,16 @@ QtSupport::ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4Pro
Profile *p;
Utils::Environment env = Utils::Environment::systemEnvironment();
- Qt4BuildConfiguration *currentBc = bc;
QStringList qmakeArgs;
- if (!currentBc)
- currentBc = activeTarget() ? qobject_cast<Qt4BuildConfiguration *>(activeTarget()->activeBuildConfiguration()) : 0;
-
- if (currentBc) {
- p = currentBc->target()->profile();
- env = currentBc->environment();
- if (currentBc->qmakeStep()) {
- qmakeArgs = currentBc->qmakeStep()->parserArguments();
- m_proFileOption->qmakespec = currentBc->qmakeStep()->mkspec().toString();
+ if (!bc)
+ bc = activeTarget() ? qobject_cast<Qt4BuildConfiguration *>(activeTarget()->activeBuildConfiguration()) : 0;
+
+ if (bc) {
+ p = bc->target()->profile();
+ env = bc->environment();
+ if (bc->qmakeStep()) {
+ qmakeArgs = bc->qmakeStep()->parserArguments();
+ m_proFileOption->qmakespec = bc->qmakeStep()->mkspec().toString();
} else {
qmakeArgs = bc->configCommandLineArguments();
}