forked from qt-creator/qt-creator
C++: fixed possible null-pointer access.
Task-number: QTCREATORBUG-2459 (cherry picked from commit d09b5e9d365e3ce54078fb172c93b9584908bcad)
This commit is contained in:
committed by
Robert Loehning
parent
d1655163f0
commit
3e3bf7e372
@@ -194,10 +194,11 @@ Symbol *SymbolTable::lookat(OperatorNameId::Kind operatorId) const
|
||||
const unsigned h = operatorId % _hashSize;
|
||||
Symbol *symbol = _hash[h];
|
||||
for (; symbol; symbol = symbol->_next) {
|
||||
const Name *identity = symbol->unqualifiedName();
|
||||
if (const OperatorNameId *op = identity->asOperatorNameId()) {
|
||||
if (op->kind() == operatorId)
|
||||
break;
|
||||
if (const Name *identity = symbol->unqualifiedName()) {
|
||||
if (const OperatorNameId *op = identity->asOperatorNameId()) {
|
||||
if (op->kind() == operatorId)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return symbol;
|
||||
|
||||
Reference in New Issue
Block a user