diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index ac65d225b52..65bf70fe584 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -548,8 +548,15 @@ void CMakeCbpParser::parseOption() { if (attributes().hasAttribute("title")) m_projectName = attributes().value("title").toString(); - if(isStartElement()) - parseUnknownElement(); + + while (!atEnd()) { + readNext(); + if (isEndElement()) { + return; + } else if(isStartElement()) { + parseUnknownElement(); + } + } } void CMakeCbpParser::parseMakeCommand()