summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2018-12-31 13:47:44 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2018-12-31 13:47:44 (GMT)
commitd57ce63ad7dc2bc61d05980e984408f1b63ff59d (patch)
tree1dae0aedc24391c7a8ada3f408a2dd735eeb379e
parent1ef6dd1d4accefe87d0941a429eef5f1fdb9cf73 (diff)
downloadDoxygen-d57ce63ad7dc2bc61d05980e984408f1b63ff59d.zip
Doxygen-d57ce63ad7dc2bc61d05980e984408f1b63ff59d.tar.gz
Doxygen-d57ce63ad7dc2bc61d05980e984408f1b63ff59d.tar.bz2
Issue 6714: Don't crash or generate invalid XML for empty TOC
-rw-r--r--src/xmlgen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index bacf4d4..44061f6 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1818,10 +1818,10 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
}
}
writeInnerPages(pd->getSubPages(),t);
- if (pd->localToc().isXmlEnabled())
+ SectionDict *sectionDict = pd->getSectionDict();
+ if (sectionDict && pd->localToc().isXmlEnabled())
{
t << " <tableofcontents>" << endl;
- SectionDict *sectionDict = pd->getSectionDict();
SDict<SectionInfo>::Iterator li(*sectionDict);
SectionInfo *si;
int level=1,l;