forked from qt-creator/qt-creator
Fixed possible crash when completing function-like arguments.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user