From 0f35487e17b81f4d8efd6aff1cbfa347b86077e4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 May 2016 17:02:20 +0200 Subject: [PATCH] (menu_content.c) Cleanup --- menu/menu_content.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/menu/menu_content.c b/menu/menu_content.c index c193756d54..1221a5d3d6 100644 --- a/menu/menu_content.c +++ b/menu/menu_content.c @@ -126,15 +126,13 @@ error: * selection needs to be made from a list, otherwise * returns true and fills in @s with path to core. **/ -static bool menu_content_find_first_core(void *data) +static bool menu_content_find_first_core(menu_content_ctx_defer_info_t *def_info) { char new_core_path[PATH_MAX_LENGTH]; const core_info_t *info = NULL; size_t supported = 0; - menu_content_ctx_defer_info_t *def_info = - (menu_content_ctx_defer_info_t *)data; - core_info_list_t *core_info = - (core_info_list_t*)def_info->data; + core_info_list_t *core_info = def_info ? + (core_info_list_t*)def_info->data : NULL; uint32_t menu_label_hash = menu_hash_calculate(def_info->menu_label);