Commit c3ea545cf74d75082edb37bc3cedc396113e6669
Fixed possible crash on constructor completion
When constructor completion was attempted on a base class specified in a
class declaration, a null pointer reference would occur.
Task-number: QTCREATORBUG-321
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
(cherry picked from commit 69969bef43f8077b7402e46bfc9a1765ad6afd7d)
| |   |
| 1060 | 1060 | if (doc->parse(Document::ParseDeclaration)) { |
| 1061 | 1061 | doc->check(); |
| 1062 | 1062 | if (SimpleDeclarationAST *sd = doc->translationUnit()->ast()->asSimpleDeclaration()) { |
| if (sd->declarators->declarator->postfix_declarators |
| if (sd->declarators && |
| sd->declarators->declarator->postfix_declarators |
| 1064 | 1065 | && sd->declarators->declarator->postfix_declarators->asFunctionDeclarator()) { |
| 1065 | 1066 | autocompleteSignature = true; |
| 1066 | 1067 | } |