Fix a crash

This commit is contained in:
Zane U. Ji 2019-09-14 21:55:14 +08:00
parent d1708087d1
commit 4d2099a9d2
2 changed files with 6 additions and 1 deletions

View File

@ -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;

View File

@ -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,