Fixed possible crash when completing function-like arguments.

This commit is contained in:
Roberto Raggi
2009-07-09 16:20:20 +02:00
parent 61e468a885
commit 85c501c976
2 changed files with 3 additions and 3 deletions

View File

@@ -1013,7 +1013,7 @@ bool CppCodeCompletion::completeMember(const QList<TypeOfExpression::Result> &re
namedTy = ty->asNamedType();
if (! namedTy) {
Function *fun = ty->asFunctionType();
if (fun && (fun->scope()->isBlockScope() || fun->scope()->isNamespaceScope()))
if (fun && fun->scope() && (fun->scope()->isBlockScope() || fun->scope()->isNamespaceScope()))
namedTy = fun->returnType()->asNamedType();
}
}