1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00

Avoid a crash if there is no backed up config file on tvOS (#15694)

This commit is contained in:
Eric Warmenhoven 2023-09-14 12:11:00 -04:00 committed by GitHub
parent a8a33cf3c4
commit c5f6175f12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -863,7 +863,7 @@ config_file_t *open_userdefaults_config_file(void)
{
config_file_t *conf = NULL;
NSString *backup = [NSUserDefaults.standardUserDefaults stringForKey:@FILE_PATH_MAIN_CONFIG];
if ([backup length] >= 0)
if ([backup length] > 0)
{
char *str = strdup(backup.UTF8String);
conf = config_file_new_from_string(str, path_get(RARCH_PATH_CONFIG));