From 2dcbf7b29510a99168b1ab3f7d67d21a28a70eaf Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 20 Dec 2020 21:16:11 +0100 Subject: Regression: Fixed crash while processing the Kafka package. --- src/classdef.cpp | 7 +++++-- src/doxygen.cpp | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/classdef.cpp b/src/classdef.cpp index a1c9287..d4c14d6 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -4046,8 +4046,11 @@ ClassDef *ClassDefImpl::insertTemplateInstance(const QCString &fileName, { Debug::print(Debug::Classes,0," New template instance class '%s''%s'\n",qPrint(name()),qPrint(templSpec)); QCString tcname = removeRedundantWhiteSpace(localName()+templSpec); - templateClass = new ClassDefImpl( - fileName,startLine,startColumn,tcname,ClassDef::Class); + templateClass = + toClassDefMutable( + Doxygen::classLinkedMap->add(tcname, + std::unique_ptr( + new ClassDefImpl(fileName,startLine,startColumn,tcname,ClassDef::Class)))); templateClass->setTemplateMaster(this); templateClass->setOuterScope(getOuterScope()); templateClass->setHidden(isHidden()); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 52cd4ac..64e5ac3 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -4106,7 +4106,6 @@ static bool findTemplateInstanceRelation(const Entry *root, if (freshInstance) { Debug::print(Debug::Classes,0," found fresh instance '%s'!\n",qPrint(instanceClass->name())); - Doxygen::classLinkedMap->add(instanceClass->name(),std::unique_ptr(instanceClass)); instanceClass->setTemplateBaseClassNames(templateNames); // search for new template instances caused by base classes of -- cgit v0.12