diff options
author | albert-github <albert.tests@gmail.com> | 2018-12-14 11:33:37 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-12-14 11:33:37 (GMT) |
commit | 17338710275948c23e0f0b312d004b84976f68bc (patch) | |
tree | 0a163bfcbcbf134cfecf101076d3b5be748ac8f6 | |
parent | ca2e7ae50604cfdf9c0661b5be4264d1df9176f3 (diff) | |
download | Doxygen-17338710275948c23e0f0b312d004b84976f68bc.zip Doxygen-17338710275948c23e0f0b312d004b84976f68bc.tar.gz Doxygen-17338710275948c23e0f0b312d004b84976f68bc.tar.bz2 |
Bug 793076 - Segmentation fault when generating graphical class hierarchy
Prevent endless loop during renumbering
-rw-r--r-- | src/dot.cpp | 7 | ||||
-rw-r--r-- | src/dot.h | 1 |
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); + } } } } @@ -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; |