From 0c08726a8e8da99a6699900d1a6ca651a0013c97 Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sun, 5 May 2013 23:06:43 -0400 Subject: [PATCH] (GX) workaround weird bug in file detection --- frontend/platform/platform_gx.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/platform/platform_gx.c b/frontend/platform/platform_gx.c index 175488f8d6..55c26fbf26 100644 --- a/frontend/platform/platform_gx.c +++ b/frontend/platform/platform_gx.c @@ -100,9 +100,14 @@ static void salamander_init_settings(void) if(config_file_exists) { config_file_t * conf = config_file_new(default_paths.config_path); - config_get_array(conf, "libretro_path", tmp_str, sizeof(tmp_str)); - config_file_free(conf); - snprintf(default_paths.libretro_path, sizeof(default_paths.libretro_path), tmp_str); + if (!conf) // stupid libfat bug or something; somtimes it says the file is there when it doesn't + config_file_exists = false; + else + { + config_get_array(conf, "libretro_path", tmp_str, sizeof(tmp_str)); + config_file_free(conf); + snprintf(default_paths.libretro_path, sizeof(default_paths.libretro_path), tmp_str); + } } if(!config_file_exists || !strcmp(default_paths.libretro_path, ""))