mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 13:20:43 +00:00
load_content - call string_list_new later
This commit is contained in:
parent
a79a2d6e1c
commit
29ad7620aa
12
content.c
12
content.c
@ -464,16 +464,15 @@ static bool load_content(const struct retro_subsystem_info *special,
|
|||||||
const struct string_list *content)
|
const struct string_list *content)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
struct string_list* additional_path_allocs = string_list_new();
|
struct string_list* additional_path_allocs = NULL;
|
||||||
struct retro_game_info *info = (struct retro_game_info*)
|
struct retro_game_info *info = (struct retro_game_info*)
|
||||||
calloc(content->size, sizeof(*info));
|
calloc(content->size, sizeof(*info));
|
||||||
|
|
||||||
if (!info)
|
if (!info)
|
||||||
{
|
|
||||||
string_list_free(additional_path_allocs);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
additional_path_allocs = string_list_new();
|
||||||
|
|
||||||
for (i = 0; i < content->size; i++)
|
for (i = 0; i < content->size; i++)
|
||||||
{
|
{
|
||||||
@ -718,6 +717,7 @@ bool init_content_file(void)
|
|||||||
if (!load_content(special, content))
|
if (!load_content(special, content))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
|
||||||
global->inited.content = true;
|
global->inited.content = true;
|
||||||
|
|
||||||
if (content)
|
if (content)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user