diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-12-30 08:42:58 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-12-30 08:42:58 (GMT) |
commit | 4008be91ff3a2b5defb8a54af5edf15b4ca99c0e (patch) | |
tree | ddb5a83389c38cc87aca97c9765a0bfe55aa4373 /src/doxygen.cpp | |
parent | 9c9958f5faac018b4e2f117e9ae5fd7f79a9cc02 (diff) | |
download | Doxygen-4008be91ff3a2b5defb8a54af5edf15b4ca99c0e.zip Doxygen-4008be91ff3a2b5defb8a54af5edf15b4ca99c0e.tar.gz Doxygen-4008be91ff3a2b5defb8a54af5edf15b4ca99c0e.tar.bz2 |
issue #8291: Doxygen crash on Windows when INLINE_SIMPLE_STRUCTS=YES
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r-- | src/doxygen.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index bb926b3..134636e 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1469,29 +1469,41 @@ static void processTagLessClasses(const ClassDef *rootCd, } } -static void findTagLessClasses(const ClassDef *cd) +static void findTagLessClasses(std::vector<ClassDefMutable*> &candidates,const ClassDef *cd) { for (const auto &icd : cd->getClasses()) { if (icd->name().find("@")==-1) // process all non-anonymous inner classes { - findTagLessClasses(icd); + findTagLessClasses(candidates,icd); } } - processTagLessClasses(cd,cd,toClassDefMutable(cd),"",0); // process tag less inner struct/classes (if any) + ClassDefMutable *cdm = toClassDefMutable(cd); + if (cdm) + { + candidates.push_back(cdm); + } } static void findTagLessClasses() { + std::vector<ClassDefMutable *> candidates; for (const auto &cd : *Doxygen::classLinkedMap) { Definition *scope = cd->getOuterScope(); if (scope && scope->definitionType()!=Definition::TypeClass) // that is not nested { - findTagLessClasses(cd.get()); + findTagLessClasses(candidates,cd.get()); } } + + // since processTagLessClasses is potentially adding classes to Doxygen::classLinkedMap + // we need to call it outside of the loop above, otherwise the iterator gets invalidated! + for (auto &cd : candidates) + { + processTagLessClasses(cd,cd,cd,"",0); // process tag less inner struct/classes + } } |