Jeck - Fix issue 96.

This commit is contained in:
wagic.jeck
2009-10-12 23:46:30 +00:00
parent 5b4f703f4e
commit d5556d0a43

View File

@@ -414,7 +414,8 @@ int GameOptions::save(){
//Save it.
save_option(&file, it->first, name, &it->second);
}
file.close();
file.close();
}
return 1;
}
@@ -430,13 +431,11 @@ GameSettings options;
GameSettings::GameSettings()
{
//Load global options
globalOptions = NEW GameOptions(GLOBAL_SETTINGS);
//reloadProfile should be called for the rest.
globalOptions = NULL;
theGame = NULL;
profileOptions = NULL;
themeOptions = NULL;
//reloadProfile should be before using options.
}
GameSettings::~GameSettings(){
@@ -552,6 +551,9 @@ void GameSettings::reloadProfile(bool images){
void GameSettings::checkProfile(){
char buf[512];
if(!globalOptions)
globalOptions = NEW GameOptions(GLOBAL_SETTINGS);
//If it doesn't exist, load current profile.
if(!profileOptions)
profileOptions = NEW GameOptions(profileFile(PLAYER_SETTINGS,"",false));