mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-12 12:39:56 +00:00
open_default_config_file - don't initialize global until the end
This commit is contained in:
parent
49742da0b4
commit
efb3f3ec06
@ -1301,7 +1301,7 @@ static config_file_t *open_default_config_file(void)
|
|||||||
char conf_path[PATH_MAX_LENGTH] = {0};
|
char conf_path[PATH_MAX_LENGTH] = {0};
|
||||||
char app_path[PATH_MAX_LENGTH] = {0};
|
char app_path[PATH_MAX_LENGTH] = {0};
|
||||||
config_file_t *conf = NULL;
|
config_file_t *conf = NULL;
|
||||||
global_t *global = global_get_ptr();
|
global_t *global = NULL;
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(_XBOX)
|
#if defined(_WIN32) && !defined(_XBOX)
|
||||||
fill_pathname_application_path(app_path, sizeof(app_path));
|
fill_pathname_application_path(app_path, sizeof(app_path));
|
||||||
@ -1464,6 +1464,8 @@ static config_file_t *open_default_config_file(void)
|
|||||||
if (!conf)
|
if (!conf)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
global = global_get_ptr();
|
||||||
|
|
||||||
if (global)
|
if (global)
|
||||||
strlcpy(global->path.config, conf_path, sizeof(global->path.config));
|
strlcpy(global->path.config, conf_path, sizeof(global->path.config));
|
||||||
return conf;
|
return conf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user