Fixed possible crash in check undefined symbols.

This commit is contained in:
Roberto Raggi
2010-07-09 13:45:12 +02:00
parent a96cc1a332
commit 32993f460a

View File

@@ -371,7 +371,7 @@ void CheckUndefinedSymbols::checkNamespace(NameAST *name)
void CheckUndefinedSymbols::checkName(NameAST *ast)
{
if (ast->name) {
if (ast && ast->name) {
if (const Identifier *ident = ast->name->identifier()) {
const QByteArray id = QByteArray::fromRawData(ident->chars(), ident->size());
if (_potentialTypes.contains(id)) {