mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
Avoid a crash if there is no backed up config file on tvOS (#15694)
This commit is contained in:
parent
a8a33cf3c4
commit
c5f6175f12
@ -863,7 +863,7 @@ config_file_t *open_userdefaults_config_file(void)
|
|||||||
{
|
{
|
||||||
config_file_t *conf = NULL;
|
config_file_t *conf = NULL;
|
||||||
NSString *backup = [NSUserDefaults.standardUserDefaults stringForKey:@FILE_PATH_MAIN_CONFIG];
|
NSString *backup = [NSUserDefaults.standardUserDefaults stringForKey:@FILE_PATH_MAIN_CONFIG];
|
||||||
if ([backup length] >= 0)
|
if ([backup length] > 0)
|
||||||
{
|
{
|
||||||
char *str = strdup(backup.UTF8String);
|
char *str = strdup(backup.UTF8String);
|
||||||
conf = config_file_new_from_string(str, path_get(RARCH_PATH_CONFIG));
|
conf = config_file_new_from_string(str, path_get(RARCH_PATH_CONFIG));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user