Bugfix: Make Highscore working even at very first startup

git-svn-id: https://svn.code.sf.net/p/extremetuxracer/code/trunk@412 0420edf4-82e4-42fc-9478-35b55e6d67a3
master
pkeus 2013-08-16 08:33:23 +00:00
parent 238772eaee
commit 845e3995ff
1 changed files with 2 additions and 1 deletions

View File

@ -117,6 +117,8 @@ bool CScore::SaveHighScore () const {
bool CScore::LoadHighScore () {
CSPList list (520);
Scorelist.resize(Course.CourseList.size());
if (!list.Load (param.config_dir, "highscore")) {
Message ("could not load highscore list");
return false;
@ -124,7 +126,6 @@ bool CScore::LoadHighScore () {
TScore score;
Scorelist.resize(Course.CourseList.size());
for (size_t i=0; i<list.Count(); i++) {
const string& line = list.Line(i);
string course = SPStrN (line, "course", "unknown");