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

View File

@ -1270,13 +1270,17 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set)
void cheevos_test(void)
{
settings_t *settings = config_get_ptr();
if (settings->cheevos.enable && !cheevos_globals.cheats_are_enabled && !cheevos_globals.cheats_were_enabled)
if (cheevos_locals.loaded)
{
cheevos_test_cheevo_set(&cheevos_locals.core);
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);
if (settings->cheevos.test_unofficial)
cheevos_test_cheevo_set(&cheevos_locals.unofficial);
if (settings->cheevos.test_unofficial)
cheevos_test_cheevo_set(&cheevos_locals.unofficial);
}
}
}