summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2018-12-14 19:47:06 (GMT)
committerGitHub <noreply@github.com>2018-12-14 19:47:06 (GMT)
commit4d81f0f3854415a0fa1ba1695494b4681b7f862b (patch)
tree714d61b3102b67824fb901890d01d5c4fd10696b
parentcd56babd2ab06d3c73e8be0c6ac84638e9810bb5 (diff)
parent17338710275948c23e0f0b312d004b84976f68bc (diff)
downloadDoxygen-4d81f0f3854415a0fa1ba1695494b4681b7f862b.zip
Doxygen-4d81f0f3854415a0fa1ba1695494b4681b7f862b.tar.gz
Doxygen-4d81f0f3854415a0fa1ba1695494b4681b7f862b.tar.bz2
Merge pull request #6680 from albert-github/feature/bug_793076
Bug 793076 - Segmentation fault when generating graphical class hierarchy
-rw-r--r--src/dot.cpp7
-rw-r--r--src/dot.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/dot.cpp b/src/dot.cpp
index 0d8502d..0944a02 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -1515,6 +1515,7 @@ DotNode::DotNode(int n,const char *lab,const char *tip, const char *url,
, m_visible(FALSE)
, m_truncated(Unknown)
, m_distance(1000)
+ , m_renumbered(false)
{
}
@@ -2287,7 +2288,11 @@ void DotNode::renumberNodes(int &number)
DotNode *cn;
for (dnlic.toFirst();(cn=dnlic.current());++dnlic)
{
- cn->renumberNodes(number);
+ if (!cn->m_renumbered)
+ {
+ cn->m_renumbered = true;
+ cn->renumberNodes(number);
+ }
}
}
}
diff --git a/src/dot.h b/src/dot.h
index 20a1f29..dc77789 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -122,6 +122,7 @@ class DotNode
bool m_visible; //!< is the node visible in the output
TruncState m_truncated; //!< does the node have non-visible children/parents
int m_distance; //!< shortest path to the root node
+ bool m_renumbered;//!< indicates if the node has been renumbered (to prevent endless loops)
friend class DotGfxHierarchyTable;
friend class DotClassGraph;