diff --git a/menu/menu_entry.c b/menu/menu_entry.c index b430488aec..1dd576299b 100644 --- a/menu/menu_entry.c +++ b/menu/menu_entry.c @@ -289,9 +289,11 @@ void menu_entry_pathdir_selected(uint32_t i) setting->action_toggle( setting, MENU_ACTION_RIGHT, false); } -uint32_t menu_entry_pathdir_allow_empty(uint32_t i) +bool menu_entry_pathdir_allow_empty(uint32_t i) { rarch_setting_t *setting = menu_entry_get_setting(i); + if (!setting) + return false; return setting->flags & SD_FLAG_ALLOW_EMPTY; } diff --git a/menu/menu_entry.h b/menu/menu_entry.h index 2323f53d96..4c5be8b54e 100644 --- a/menu/menu_entry.h +++ b/menu/menu_entry.h @@ -88,7 +88,7 @@ void menu_entry_bind_joyaxis_set(uint32_t i, int32_t value); void menu_entry_pathdir_selected(uint32_t i); -uint32_t menu_entry_pathdir_allow_empty(uint32_t i); +bool menu_entry_pathdir_allow_empty(uint32_t i); uint32_t menu_entry_pathdir_for_directory(uint32_t i);