From fe7926913346cedac8f40345bdef7a21ca16d0cc Mon Sep 17 00:00:00 2001 From: Andre Leiradella Date: Tue, 10 Nov 2015 00:21:35 -0200 Subject: [PATCH] don't test cheevos if there are none --- cheevos.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cheevos.c b/cheevos.c index 9411494ca6..df8d5c6bda 100644 --- a/cheevos.c +++ b/cheevos.c @@ -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); + } } }