mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Fix segfault when settings.vvv or unlock.vvv is missing
To fix this bug, all we have to do is just pass the existing ScreenSettings* that we have in loadstats() to savestats(), and in loadsettings() to savesettings(). Fixes #556. Depends on #558.
This commit is contained in:
parent
55163e90d5
commit
cbf3da312f
1 changed files with 2 additions and 2 deletions
|
@ -4474,7 +4474,7 @@ void Game::loadstats(ScreenSettings* screen_settings)
|
|||
{
|
||||
// Save unlock.vvv only. Maybe we have a settings.vvv laying around too,
|
||||
// and we don't want to overwrite that!
|
||||
savestats();
|
||||
savestats(screen_settings);
|
||||
|
||||
printf("No Stats found. Assuming a new player\n");
|
||||
}
|
||||
|
@ -4953,7 +4953,7 @@ void Game::loadsettings(ScreenSettings* screen_settings)
|
|||
tinyxml2::XMLDocument doc;
|
||||
if (!FILESYSTEM_loadTiXml2Document("saves/settings.vvv", doc))
|
||||
{
|
||||
savesettings();
|
||||
savesettings(screen_settings);
|
||||
puts("No settings.vvv found");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue