1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-02-09 21:34:01 +00:00

fix possible startup crash

This commit is contained in:
fgenesis 2017-01-12 23:57:21 +01:00
parent ffa26e4105
commit d84a8bb2c2

View file

@ -482,12 +482,10 @@ void UserSettings::load(bool doApply, const std::string &overrideFile)
xml_action = xml_actionSet->FirstChildElement(); xml_action = xml_actionSet->FirstChildElement();
while (xml_action) while (xml_action)
{ {
std::string name = xml_action->Attribute("name"); const char *name = xml_action->Attribute("name");
if (name && *name)
if (!name.empty())
{ {
ActionInput *ai = control.actionSet.addActionInput(name); ActionInput *ai = control.actionSet.addActionInput(name);
ai->fromString(xml_action->Attribute("input")); ai->fromString(xml_action->Attribute("input"));
} }
xml_action = xml_action->NextSiblingElement(); xml_action = xml_action->NextSiblingElement();