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: {
|
case BOOLEAN: {
|
||||||
bool boolVal = false;
|
bool boolVal = false;
|
||||||
// Only look at the first character.
|
// Only look at the first character.
|
||||||
if (str.front() == '1' || str.front() == 't' || str.front() == 'T' ||
|
if (str.size() > 0) {
|
||||||
str.front() == 'y' || str.front() == 'Y')
|
if (str.front() == '1' || str.front() == 't' || str.front() == 'T' ||
|
||||||
boolVal = true;
|
str.front() == 'y' || str.front() == 'Y')
|
||||||
|
boolVal = true;
|
||||||
|
}
|
||||||
|
|
||||||
element.properties[node.name()] = boolVal;
|
element.properties[node.name()] = boolVal;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue