forked from qt-creator/qt-creator
CppEditor: Fix crash in InsertQtPropertyMembers for invalid code
Change-Id: I8a3a3240033d23aa9e3df5276c4e6302d97f71b9 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user