diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-01-23 12:23:11 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-01-23 12:23:11 (GMT) |
commit | b5364e8825e41af574256f1c3cb01b28219c5b75 (patch) | |
tree | b282471baeed69796a2a442532f324faf4e7496e /src | |
parent | 65e285da95855184bfb8943a71f83143fe32f766 (diff) | |
download | Doxygen-b5364e8825e41af574256f1c3cb01b28219c5b75.zip Doxygen-b5364e8825e41af574256f1c3cb01b28219c5b75.tar.gz Doxygen-b5364e8825e41af574256f1c3cb01b28219c5b75.tar.bz2 |
Regression: fixed potential crash in ftvhelp.cpp
- Found while running doxygen on the gmic project
- Cause: vector.back() was called on an empty vector
Diffstat (limited to 'src')
-rw-r--r-- | src/ftvhelp.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index 3bcf2c6..f411a60 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -185,9 +185,9 @@ void FTVHelp::decContentsDepth() { m_indent--; std::vector<FTVNode*> &nl = m_indentNodes[m_indent]; - FTVNode *parent = nl.back(); - if (parent) + if (!nl.empty()) { + FTVNode *parent = nl.back(); std::vector<FTVNode*> &children = m_indentNodes[m_indent+1]; for (const auto &child : children) { |