CppEditor: Fix crash in InsertQtPropertyMembers for invalid code

Change-Id: I8a3a3240033d23aa9e3df5276c4e6302d97f71b9
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2014-11-26 13:45:22 +01:00
parent 9f272bcb8c
commit 5cc3378858
2 changed files with 6 additions and 1 deletions

View File

@@ -4254,7 +4254,7 @@ void InsertQtPropertyMembers::match(const CppQuickFixInterface &interface,
AST * const ast = path.last();
QtPropertyDeclarationAST *qtPropertyDeclaration = ast->asQtPropertyDeclaration();
if (!qtPropertyDeclaration)
if (!qtPropertyDeclaration || !qtPropertyDeclaration->type_id)
return;
ClassSpecifierAST *klass = 0;