Fixed a crash

This commit is contained in:
Zane U. Ji 2014-05-05 20:25:17 +08:00
parent e4baedaa4b
commit cb2c31cfa4
1 changed files with 3 additions and 0 deletions

View File

@ -271,6 +271,9 @@ InputSource *WrapXerces::resolveEntity (
return new LocalFileInputSource ( return new LocalFileInputSource (
( const XMLCh * ) WrapXerces::toString ( file ).GetData() ); ( const XMLCh * ) WrapXerces::toString ( file ).GetData() );
if (systemId.empty() && publicId.empty())
return NULL;
wxString fileURL = WrapLibxml::FileNameToURL ( fileName ); wxString fileURL = WrapLibxml::FileNameToURL ( fileName );
return new URLInputSource return new URLInputSource
( ( const XMLCh * ) WrapXerces::toString ( fileURL ).GetData() ( ( const XMLCh * ) WrapXerces::toString ( fileURL ).GetData()