Skip to content

Commit

Permalink
Properly handle empty TOC in XML output.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mosra committed Dec 29, 2018
1 parent c376808 commit cfe381e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xmlgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cfe381e

Please sign in to comment.