diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2010-09-27 17:52:40 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@nokia.com> | 2010-09-27 19:06:33 +0200 |
commit | 3e3bf7e37298841351648970c3cfee770547d7e3 (patch) | |
tree | 8657722884083a81c444d4aa845586bc9345fd7c /src/shared/cplusplus/Scope.cpp | |
parent | d1655163f0a58f3e0260b70b5a02b336190e8863 (diff) | |
download | qt-creator-3e3bf7e37298841351648970c3cfee770547d7e3.tar.gz |
C++: fixed possible null-pointer access.
Task-number: QTCREATORBUG-2459
(cherry picked from commit d09b5e9d365e3ce54078fb172c93b9584908bcad)
Diffstat (limited to 'src/shared/cplusplus/Scope.cpp')
-rw-r--r-- | src/shared/cplusplus/Scope.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/shared/cplusplus/Scope.cpp b/src/shared/cplusplus/Scope.cpp index 87655be6c3..ee5253b7dd 100644 --- a/src/shared/cplusplus/Scope.cpp +++ b/src/shared/cplusplus/Scope.cpp @@ -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; |