Blame doxygen-1.8.15-handle_empty_TOC_in_XML_output.patch
|
Than Ngo |
73e6d6 |
commit cfe381e3ee55b8291faeea55fe3b67bb9e545d60
|
|
Than Ngo |
73e6d6 |
Author: Vladimír Vondruš <mosra@centrum.cz>
|
|
Than Ngo |
73e6d6 |
Date: Sat Dec 29 21:52:39 2018 +0100
|
|
Than Ngo |
73e6d6 |
|
|
Than Ngo |
73e6d6 |
Properly handle empty TOC in XML output.
|
|
Than Ngo |
73e6d6 |
|
|
Than Ngo |
73e6d6 |
Caused the test (079) to fail with a SIGSEGV, but larger projects exit
|
|
Than Ngo |
73e6d6 |
with a success return code and the generated XML is either truncated or
|
|
Than Ngo |
73e6d6 |
empty. Weird.
|
|
Than Ngo |
73e6d6 |
|
|
Than Ngo |
73e6d6 |
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
|
|
Than Ngo |
73e6d6 |
index bacf4d41..033e611f 100644
|
|
Than Ngo |
73e6d6 |
--- a/src/xmlgen.cpp
|
|
Than Ngo |
73e6d6 |
+++ b/src/xmlgen.cpp
|
|
Than Ngo |
73e6d6 |
@@ -1818,10 +1818,10 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
|
|
Than Ngo |
73e6d6 |
}
|
|
Than Ngo |
73e6d6 |
}
|
|
Than Ngo |
73e6d6 |
writeInnerPages(pd->getSubPages(),t);
|
|
Than Ngo |
73e6d6 |
- if (pd->localToc().isXmlEnabled())
|
|
Than Ngo |
73e6d6 |
+ SectionDict *sectionDict = pd->getSectionDict();
|
|
Than Ngo |
73e6d6 |
+ if (pd->localToc().isXmlEnabled() && sectionDict)
|
|
Than Ngo |
73e6d6 |
{
|
|
Than Ngo |
73e6d6 |
t << " <tableofcontents>" << endl;
|
|
Than Ngo |
73e6d6 |
- SectionDict *sectionDict = pd->getSectionDict();
|
|
Than Ngo |
73e6d6 |
SDict<SectionInfo>::Iterator li(*sectionDict);
|
|
Than Ngo |
73e6d6 |
SectionInfo *si;
|
|
Than Ngo |
73e6d6 |
int level=1,l;
|