Commit 6382b7d9 authored by Olivier Teulière's avatar Olivier Teulière

* skins2/parser/skin_parser.cpp: Fixed a crash, and removed checks for unused attributes

parent 64c616ac
...@@ -329,6 +329,7 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr ) ...@@ -329,6 +329,7 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
CheckDefault( "bgcolor2", "#FFFFFF" ); CheckDefault( "bgcolor2", "#FFFFFF" );
CheckDefault( "selcolor", "#0000FF" ); CheckDefault( "selcolor", "#0000FF" );
CheckDefault( "help", "" ); CheckDefault( "help", "" );
m_curTreeId = uniqueId( attr["id"] ); m_curTreeId = uniqueId( attr["id"] );
const BuilderData::Tree treeData( m_curTreeId, atoi( attr["x"] ) + const BuilderData::Tree treeData( m_curTreeId, atoi( attr["x"] ) +
m_xOffset, atoi( attr["y"] ) + m_yOffset, attr["visible"], m_xOffset, atoi( attr["y"] ) + m_yOffset, attr["visible"],
...@@ -433,8 +434,6 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr ) ...@@ -433,8 +434,6 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
CheckDefault( "visible", "true" ); CheckDefault( "visible", "true" );
CheckDefault( "x", "0" ); CheckDefault( "x", "0" );
CheckDefault( "y", "0" ); CheckDefault( "y", "0" );
CheckDefault( "width", "0" );
CheckDefault( "height", "0" );
CheckDefault( "lefttop", "lefttop" ); CheckDefault( "lefttop", "lefttop" );
CheckDefault( "rightbottom", "lefttop" ); CheckDefault( "rightbottom", "lefttop" );
CheckDefault( "xkeepratio", "false" ); CheckDefault( "xkeepratio", "false" );
...@@ -539,6 +538,10 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr ) ...@@ -539,6 +538,10 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
else if( rName == "ThemeInfo" ) else if( rName == "ThemeInfo" )
{ {
CheckDefault( "name", "" );
CheckDefault( "author", "" );
CheckDefault( "email", "" );
CheckDefault( "website", "" );
msg_Info( getIntf(), "skin: %s author: %s", attr["name"], msg_Info( getIntf(), "skin: %s author: %s", attr["name"],
attr["author"] ); attr["author"] );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment