summaryrefslogtreecommitdiffstats
path: root/src/filedef.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-11-01 21:07:05 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-11-01 21:07:05 (GMT)
commitbfe598c49fb7c99c93c84b7fcd7ea8ae8bb00739 (patch)
tree8f06ac8db15c135f3d1dec4383f528a0d540a78a /src/filedef.cpp
parent1ad25b7233704df79baf1a98f1951f467b9c4abc (diff)
downloadDoxygen-bfe598c49fb7c99c93c84b7fcd7ea8ae8bb00739.zip
Doxygen-bfe598c49fb7c99c93c84b7fcd7ea8ae8bb00739.tar.gz
Doxygen-bfe598c49fb7c99c93c84b7fcd7ea8ae8bb00739.tar.bz2
Fixed issue in combineUsingRelations() that could lead to the use of invalid iterators
Diffstat (limited to 'src/filedef.cpp')
-rw-r--r--src/filedef.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 9001f62..3279179 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -1892,10 +1892,14 @@ void FileDefImpl::combineUsingRelations()
{
if (m_visited) return; // already done
m_visited=TRUE;
- for (auto &nd : m_usingDirList)
+ LinkedRefMap<const NamespaceDef> usingDirList = m_usingDirList;
+ for (auto &nd : usingDirList)
{
const_cast<NamespaceDef*>(nd)->combineUsingRelations();
+ }
+ for (auto &nd : usingDirList)
+ {
// add used namespaces of namespace nd to this namespace
for (const auto &und : nd->getUsedNamespaces())
{