mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed a potential crash for legacy themes with broken configuration.
This commit is contained in:
parent
bdbc0580d2
commit
70eb937f85
|
@ -1182,9 +1182,11 @@ void ThemeData::parseElement(const pugi::xml_node& root,
|
|||
case BOOLEAN: {
|
||||
bool boolVal = false;
|
||||
// Only look at the first character.
|
||||
if (str.front() == '1' || str.front() == 't' || str.front() == 'T' ||
|
||||
str.front() == 'y' || str.front() == 'Y')
|
||||
boolVal = true;
|
||||
if (str.size() > 0) {
|
||||
if (str.front() == '1' || str.front() == 't' || str.front() == 'T' ||
|
||||
str.front() == 'y' || str.front() == 'Y')
|
||||
boolVal = true;
|
||||
}
|
||||
|
||||
element.properties[node.name()] = boolVal;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue