aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/cppeditor/doxygengenerator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/doxygengenerator.cpp b/src/plugins/cppeditor/doxygengenerator.cpp
index 9ab9e109eb..23d551afc8 100644
--- a/src/plugins/cppeditor/doxygengenerator.cpp
+++ b/src/plugins/cppeditor/doxygengenerator.cpp
@@ -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;