Thoroughly deinitialise expat parsers before freeing them (#103)
## Summary * Thoroughly deinitialise expat parsers before freeing them * Spotted a few crashes when de-initing expat parsers
This commit is contained in:
@@ -16,6 +16,8 @@ bool ContainerParser::setup() {
|
||||
|
||||
ContainerParser::~ContainerParser() {
|
||||
if (parser) {
|
||||
XML_StopParser(parser, XML_FALSE); // Stop any pending processing
|
||||
XML_SetElementHandler(parser, nullptr, nullptr); // Clear callbacks
|
||||
XML_ParserFree(parser);
|
||||
parser = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user