[vlc-commits] commit: skins2: don't load XML catalog if DTD not requested ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Thu Aug 5 18:08:35 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 5 18:55:57 2010 +0300| [49b4824b37e23995ef9c7eb46a8aba427a4fad19] | committer: Rémi Denis-Courmont
skins2: don't load XML catalog if DTD not requested
Also don't fail if the XML validator cannot be loaded.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=49b4824b37e23995ef9c7eb46a8aba427a4fad19
---
modules/gui/skins2/parser/xmlparser.cpp | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/modules/gui/skins2/parser/xmlparser.cpp b/modules/gui/skins2/parser/xmlparser.cpp
index f45dc0f..ca287da 100644
--- a/modules/gui/skins2/parser/xmlparser.cpp
+++ b/modules/gui/skins2/parser/xmlparser.cpp
@@ -39,21 +39,19 @@ XMLParser::XMLParser( intf_thread_t *pIntf, const string &rFileName,
m_pReader = NULL;
m_pStream = NULL;
- m_pXML = xml_Create( pIntf );
- if( !m_pXML )
+ if( useDTD )
{
- msg_Err( getIntf(), "failed to open XML parser" );
- return;
+ m_pXML = xml_Create( pIntf );
+ if( m_pXML )
+ LoadCatalog();
+ else
+ {
+ msg_Err( getIntf(), "DTD not supported" );
+ useDTD = false;
+ }
}
-
- // Avoid duplicate initialization (mutex needed ?) -> doesn't work
- // Reinitialization required for a new XMLParser
- // if( !m_initialized )
- // {
- // LoadCatalog();
- // m_initialized = true;
- // }
- LoadCatalog();
+ else
+ m_pXML = NULL;
char* psz_uri = make_URI( rFileName.c_str(), NULL );
m_pStream = stream_UrlNew( pIntf, psz_uri );
More information about the vlc-commits
mailing list