Prevent 'explicit null dereferenced' warning

This commit is contained in:
twinaphex 2016-06-02 20:53:26 +02:00
parent 7b04375c9b
commit 307361e12c

View File

@ -260,8 +260,13 @@ struct string_list *string_list_new_special(enum string_list_type type,
for (i = 0; i < *list_size; i++)
{
const char *opt = NULL;
const core_info_t *info = (const core_info_t*)&core_info[i];
const char *opt = info->display_name;
if (!info)
goto error;
opt = info->display_name;
if (!opt)
goto error;