set list to NULL after free in case autoconfig directory is empty

This commit is contained in:
Brad Parker 2017-09-30 19:03:39 -04:00
parent 45ce8bf773
commit 7a6d2cb5e6

View File

@ -242,7 +242,10 @@ static bool input_autoconfigure_joypad_from_conf_dir(
if (!list || !list->size)
{
if (list)
{
string_list_free(list);
list = NULL;
}
if (!string_is_empty(params->autoconfig_directory))
list = dir_list_new_special(params->autoconfig_directory,
DIR_LIST_AUTOCONFIG, "cfg");