summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2017-05-02 16:29:56 +0200
committerTobias Hunger <tobias.hunger@qt.io>2017-05-03 11:53:01 +0000
commitccdf3354253b7d13cf2ae4b403eb51e46b4e9d77 (patch)
treedaa29d187aa9a4194849072cc25d4042fb28f1d7
parent3438b427191fdb686c8f4c9ed136046f162724f6 (diff)
downloadqt-creator-ccdf3354253b7d13cf2ae4b403eb51e46b4e9d77.tar.gz
CMake: Fix possible nullptr dereference
Change-Id: Iadb62b671e115b2348dbe1d927212fd79a7fdf33 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildstep.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
index a68f18f630..1ecb3e4bc8 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
@@ -182,7 +182,7 @@ bool CMakeBuildStep::init(QList<const BuildStep *> &earlierSteps)
emit addTask(Task::buildConfigurationMissingTask());
canInit = false;
}
- if (!bc->isEnabled()) {
+ if (bc && !bc->isEnabled()) {
emit addTask(Task(Task::Error,
QCoreApplication::translate("CMakeProjectManager::CMakeBuildStep",
"The build configuration is currently disabled."),