diff options
author | Vladimír Vondruš <mosra@centrum.cz> | 2018-12-29 20:52:39 (GMT) |
---|---|---|
committer | Vladimír Vondruš <mosra@centrum.cz> | 2018-12-29 23:47:41 (GMT) |
commit | cfe381e3ee55b8291faeea55fe3b67bb9e545d60 (patch) | |
tree | 0b575b6fe39fcb9b2fb33ea6b18d88bc1bc9bf27 /src/xmlgen.cpp | |
parent | c3768085f8ab68cd61bae4d132b74d9edd813ce0 (diff) | |
download | Doxygen-cfe381e3ee55b8291faeea55fe3b67bb9e545d60.zip Doxygen-cfe381e3ee55b8291faeea55fe3b67bb9e545d60.tar.gz Doxygen-cfe381e3ee55b8291faeea55fe3b67bb9e545d60.tar.bz2 |
Properly handle empty TOC in XML output.
Caused the test (079) to fail with a SIGSEGV, but larger projects exit
with a success return code and the generated XML is either truncated or
empty. Weird.
Diffstat (limited to 'src/xmlgen.cpp')
-rw-r--r-- | src/xmlgen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index bacf4d4..033e611 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 (pd->localToc().isXmlEnabled() && sectionDict) { t << " <tableofcontents>" << endl; - SectionDict *sectionDict = pd->getSectionDict(); SDict<SectionInfo>::Iterator li(*sectionDict); SectionInfo *si; int level=1,l; |