Cure null pointer access within Scope::findFunction introduced by recent cs
This commit is contained in:
parent
0ba3c15c52
commit
8bcf833bb7
|
@ -3006,7 +3006,8 @@ const Function* Scope::findFunction(const Token *tok) const
|
||||||
// check for a match with a variable
|
// check for a match with a variable
|
||||||
if (Token::Match(arguments[j], "%var% ,|)") && arguments[j]->varId()) {
|
if (Token::Match(arguments[j], "%var% ,|)") && arguments[j]->varId()) {
|
||||||
const Variable * callarg = check->getVariableFromVarId(arguments[j]->varId());
|
const Variable * callarg = check->getVariableFromVarId(arguments[j]->varId());
|
||||||
if (callarg->typeStartToken()->str() == funcarg->typeStartToken()->str() &&
|
if (callarg &&
|
||||||
|
callarg->typeStartToken()->str() == funcarg->typeStartToken()->str() &&
|
||||||
callarg->typeStartToken()->isUnsigned() == funcarg->typeStartToken()->isUnsigned() &&
|
callarg->typeStartToken()->isUnsigned() == funcarg->typeStartToken()->isUnsigned() &&
|
||||||
callarg->typeStartToken()->isLong() == funcarg->typeStartToken()->isLong()) {
|
callarg->typeStartToken()->isLong() == funcarg->typeStartToken()->isLong()) {
|
||||||
same++;
|
same++;
|
||||||
|
|
Loading…
Reference in New Issue