mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-27 14:23:06 +00:00
(task_content.c) Only do strdup when variable is non-empty
This commit is contained in:
parent
d39acc3f8e
commit
a91e00026b
@ -1389,11 +1389,14 @@ bool content_init(void)
|
||||
{
|
||||
content_ctx.history_list_enable = settings->history_list_enable;
|
||||
content_ctx.set_supports_no_game_enable = settings->set_supports_no_game_enable;
|
||||
content_ctx.directory_system = strdup(settings->directory.system);
|
||||
content_ctx.directory_cache = strdup(settings->directory.cache);
|
||||
|
||||
if (!string_is_empty(settings->directory.system))
|
||||
content_ctx.directory_system = strdup(settings->directory.system);
|
||||
if (!string_is_empty(settings->directory.cache))
|
||||
content_ctx.directory_cache = strdup(settings->directory.cache);
|
||||
if (!string_is_empty(sys_info->info.valid_extensions))
|
||||
content_ctx.valid_extensions = strdup(sys_info->info.valid_extensions);
|
||||
|
||||
content_ctx.block_extract = sys_info->info.block_extract;
|
||||
content_ctx.need_fullpath = sys_info->info.need_fullpath;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user