Commit 3e3bf7e3 authored by Erik Verbruggen's avatar Erik Verbruggen Committed by Robert Loehning

C++: fixed possible null-pointer access.

Task-number: QTCREATORBUG-2459
(cherry picked from commit d09b5e9d365e3ce54078fb172c93b9584908bcad)
parent d1655163
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment