[C++] Fix crash for missing token after #include directive.

Change-Id: Ia54c5ddc801962c89dc0483f5912f1de436b8f43
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
This commit is contained in:
Erik Verbruggen
2012-03-30 13:34:46 +02:00
parent 808097afb1
commit 48154450de

View File

@@ -1130,6 +1130,11 @@ void Preprocessor::handleIncludeDirective(PPToken *tk)
} }
included = included.trimmed(); included = included.trimmed();
if (included.isEmpty()) {
//### TODO: error message
return;
}
// qDebug("include [[%s]]", included.toUtf8().constData()); // qDebug("include [[%s]]", included.toUtf8().constData());
Client::IncludeType mode; Client::IncludeType mode;
if (included.at(0) == '"') if (included.at(0) == '"')