diff options
Diffstat (limited to 'src/ftvhelp.cpp')
-rw-r--r-- | src/ftvhelp.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index 4951b03..4816b50 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -520,6 +520,7 @@ void FTVHelp::finalize() */ void FTVHelp::incContentsDepth() { + //printf("incContentsDepth() indent=%d\n",m_indent); m_indent++; ASSERT(m_indent<MAX_INDENT); } @@ -530,16 +531,20 @@ void FTVHelp::incContentsDepth() */ void FTVHelp::decContentsDepth() { + //printf("decContentsDepth() indent=%d\n",m_indent); ASSERT(m_indent>0); if (m_indent>0) { m_indent--; QList<FTVNode> *nl = &m_indentNodes[m_indent]; FTVNode *parent = nl->getLast(); - QList<FTVNode> *children = &m_indentNodes[m_indent+1]; - while (!children->isEmpty()) + if (parent) { - parent->children.append(children->take(0)); + QList<FTVNode> *children = &m_indentNodes[m_indent+1]; + while (!children->isEmpty()) + { + parent->children.append(children->take(0)); + } } } } |