mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15: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: {
|
case BOOLEAN: {
|
||||||
bool boolVal = false;
|
bool boolVal = false;
|
||||||
// Only look at the first character.
|
// Only look at the first character.
|
||||||
|
if (str.size() > 0) {
|
||||||
if (str.front() == '1' || str.front() == 't' || str.front() == 'T' ||
|
if (str.front() == '1' || str.front() == 't' || str.front() == 'T' ||
|
||||||
str.front() == 'y' || str.front() == 'Y')
|
str.front() == 'y' || str.front() == 'Y')
|
||||||
boolVal = true;
|
boolVal = true;
|
||||||
|
}
|
||||||
|
|
||||||
element.properties[node.name()] = boolVal;
|
element.properties[node.name()] = boolVal;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue