diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index 8eba0720cfa06acdfed8daa311fd5f9942e2919b..ec8df0716defe140a55497dc5d67f2c222b99519 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -240,10 +240,7 @@ QStringList CMakeProject::getCXXFlagsFor(const CMakeBuildTarget &buildTarget, QB
 
 bool CMakeProject::parseCMakeLists()
 {
-    if (!activeTarget() ||
-        !activeTarget()->activeBuildConfiguration()) {
-        return false;
-    }
+    QTC_ASSERT(activeTarget() && activeTarget()->activeBuildConfiguration(), return false);
 
     CMakeBuildConfiguration *activeBC = static_cast<CMakeBuildConfiguration *>(activeTarget()->activeBuildConfiguration());
     foreach (Core::IDocument *document, Core::DocumentModel::openedDocuments())