diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-09-02 17:55:42 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-09-02 18:08:22 +0200 |
commit | 34a8a57d81ce73beef95ff2865226fdc3e0134ed (patch) | |
tree | b004756941c762826f886c25a21feea3ec511652 | |
parent | ee8ea6dfdb2e5d7900004e15f410a00be9ed4804 (diff) | |
download | qt-creator-34a8a57d81ce73beef95ff2865226fdc3e0134ed.tar.gz |
fix crash when no command line options are passed to qmake
the root cause is in the API of parsedProFile(): it discerns
isNull() and isEmpty(), which is of course a time bomb.
but in this case the right solution is not trying to parse
the empty string in the first place.
-rw-r--r-- | src/shared/proparser/profileevaluator.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index bed1b6a586..216a447882 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -1273,6 +1273,7 @@ ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::visitProFile( if (tgt.isEmpty()) tgt.append(ProString(QFileInfo(pro->fileName()).baseName(), NoHash)); + if (!m_cmdArgs.isEmpty()) { if (ProFile *pro = m_parser->parsedProFile( fL1S("(command line)"), false, m_cmdArgs.join(fL1S("\n")))) { m_locationStack.push(m_current); @@ -1280,6 +1281,7 @@ ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::visitProFile( m_current = m_locationStack.pop(); pro->deref(); } + } } visitProBlock(pro, pro->tokPtr()); |