Bugfix : adding depend-on="" in a challenge file would cause the challenge to be unplayable

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4961 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-03-08 18:50:05 +00:00
parent 56ad4bbec9
commit fafed60136

View File

@ -149,8 +149,10 @@ ChallengeData::ChallengeData(const std::string& filename)
std::vector< std::string > deps; std::vector< std::string > deps;
root->get("depend-on", &deps); root->get("depend-on", &deps);
for(unsigned int i=0; i<deps.size(); i++) addDependency(deps[i]); for (unsigned int i=0; i<deps.size(); i++)
{
if (deps[i].size() > 0) addDependency(deps[i]);
}
delete root; delete root;
} // ChallengeData } // ChallengeData