don't test cheevos if there are none

This commit is contained in:
Andre Leiradella 2015-11-10 00:21:35 -02:00
parent 181fae83eb
commit fe79269133
1 changed files with 9 additions and 5 deletions

View File

@ -1269,8 +1269,11 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set)
}
void cheevos_test(void)
{
if (cheevos_locals.loaded)
{
settings_t *settings = config_get_ptr();
if (settings->cheevos.enable && !cheevos_globals.cheats_are_enabled && !cheevos_globals.cheats_were_enabled)
{
cheevos_test_cheevo_set(&cheevos_locals.core);
@ -1279,6 +1282,7 @@ void cheevos_test(void)
cheevos_test_cheevo_set(&cheevos_locals.unofficial);
}
}
}
/*****************************************************************************
Free the loaded achievements.