forked from qt-creator/qt-creator
CppEditor: Do not crash on doxygen comment creation
... for templates that were not parsed entirely successfully.
Amends a437539096
.
Fixes: QTCREATORBUG-27207
Change-Id: I4d7935b30cac9ce14f442977d07417a343ecae11
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -141,8 +141,10 @@ QString DoxygenGenerator::generate(QTextCursor cursor,
|
||||
|
||||
QString DoxygenGenerator::generate(QTextCursor cursor, DeclarationAST *decl)
|
||||
{
|
||||
if (const TemplateDeclarationAST * const templDecl = decl->asTemplateDeclaration())
|
||||
if (const TemplateDeclarationAST * const templDecl = decl->asTemplateDeclaration();
|
||||
templDecl && templDecl->declaration) {
|
||||
decl = templDecl->declaration;
|
||||
}
|
||||
|
||||
SpecifierAST *spec = nullptr;
|
||||
DeclaratorAST *decltr = nullptr;
|
||||
|
Reference in New Issue
Block a user