From 0b24fec383148603cb9f40a323be3fb3b1582bbf Mon Sep 17 00:00:00 2001 From: Marco Rogers Date: Thu, 1 Jul 2010 02:07:03 -0400 Subject: [PATCH] fixed destructor to detect empty context and avoid segfault --- src/xml_sax_parser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xml_sax_parser.cc b/src/xml_sax_parser.cc index 083566f6..7a7e8137 100644 --- a/src/xml_sax_parser.cc +++ b/src/xml_sax_parser.cc @@ -53,7 +53,7 @@ XmlSaxParser::initializeContext() { void XmlSaxParser::releaseContext() { - if (context_) { + if (context_ && context_->_private) { context_->_private = 0; if (context_->myDoc != NULL) xmlFreeDoc(context_->myDoc);