Skip to content

Commit

Permalink
fixed destructor to detect empty context and avoid segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
polotek committed Jul 1, 2010
1 parent 288c694 commit 0b24fec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xml_sax_parser.cc
Expand Up @@ -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);
Expand Down

0 comments on commit 0b24fec

Please sign in to comment.