Guard against null settings; only test leaderboards if enabled

This commit is contained in:
Andre Leiradella 2018-09-26 23:03:31 +01:00
parent 377d256ce9
commit ad992d227b

View File

@ -972,10 +972,16 @@ void cheevos_test(void)
cheevos_test_cheevo_set(true);
if (settings->bools.cheevos_test_unofficial)
cheevos_test_cheevo_set(false);
cheevos_test_leaderboards();
if (settings)
{
if (settings->bools.cheevos_test_unofficial)
cheevos_test_cheevo_set(false);
if (settings->bools.cheevos_hardcore_mode_enable &&
settings->bools.cheevos_leaderboards_enable &&
!cheevos_hardcore_paused)
cheevos_test_leaderboards();
}
}
bool cheevos_set_cheats(void)