diff --git a/src/shared/cplusplus/CheckExpression.cpp b/src/shared/cplusplus/CheckExpression.cpp index 726a113a8e22cbc84876ec0725d43ae464be341f..e26a19ba8054b83e97401cda2a95406a8d045bb6 100644 --- a/src/shared/cplusplus/CheckExpression.cpp +++ b/src/shared/cplusplus/CheckExpression.cpp @@ -319,8 +319,8 @@ bool CheckExpression::visit(QtMethodAST *ast) Scope dummy; FullySpecifiedType methTy = semantic()->check(ast->declarator, FullySpecifiedType(), &dummy, &name); - Function *fty = methTy->asFunctionType(); - if (! fty) + Function *fty = 0; + if (! methTy || 0 == (fty = methTy->asFunctionType())) translationUnit()->warning(ast->firstToken(), "expected a function declarator"); else { for (unsigned i = 0; i < fty->argumentCount(); ++i) {