From 9fce7e62587b86870c9cfbff61bafae6b9eccc1e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 5 Jan 2015 16:00:03 +0100 Subject: [PATCH] (file_list.c) Some cleanups --- libretro-sdk/file/file_list.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libretro-sdk/file/file_list.c b/libretro-sdk/file/file_list.c index ca961af8f6..010eb7872f 100644 --- a/libretro-sdk/file/file_list.c +++ b/libretro-sdk/file/file_list.c @@ -175,21 +175,23 @@ void file_list_sort_on_alt(file_list_t *list) void *file_list_get_userdata_at_offset(const file_list_t *list, size_t idx) { + if (!list) + return NULL; return list->list[idx].userdata; } void *file_list_get_actiondata_at_offset(const file_list_t *list, size_t idx) { - if (list) - return list->list[idx].actiondata; - return NULL; + if (!list) + return NULL; + return list->list[idx].actiondata; } void *file_list_get_last_actiondata(const file_list_t *list) { - if (list) - return list->list[list->size - 1].actiondata; - return NULL; + if (!list) + return NULL; + return list->list[list->size - 1].actiondata; } void file_list_get_at_offset(const file_list_t *list, size_t idx,