diff --git a/src/wrapxerces.cpp b/src/wrapxerces.cpp index b7a50d2..9256d97 100644 --- a/src/wrapxerces.cpp +++ b/src/wrapxerces.cpp @@ -56,7 +56,10 @@ void WrapXerces::Init ( bool enableNetAccess ) throw() } ~Initializer() { - delete mOriginalNetAccessor; + if ( mOriginalNetAccessor != NULL ) { + XMLPlatformUtils::fgNetAccessor = ( ( XercesNetAccessor * ) mOriginalNetAccessor )->getNetAccessor(); + delete mOriginalNetAccessor; + } XMLPlatformUtils::Terminate(); } } dummy; diff --git a/src/xercesnetaccessor.h b/src/xercesnetaccessor.h index d45ac2f..fbcdc12 100644 --- a/src/xercesnetaccessor.h +++ b/src/xercesnetaccessor.h @@ -30,6 +30,8 @@ class XercesNetAccessor : public XMLNetAccessor public: XercesNetAccessor ( XMLNetAccessor *netAccesor ); + XMLNetAccessor *getNetAccessor() const { return mNetAccessor; } + virtual const XMLCh *getId() const; virtual BinInputStream *makeNew ( const XMLURL &urlSrc,