From 147893caed5fe3f9b029d0282b3c9d1719321fbf Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 23 Oct 2016 05:55:13 +0200 Subject: [PATCH] Prevent NULL pointer dereference --- menu/menu_displaylist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index bc845edc9f..b5dc99fb92 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -162,7 +162,8 @@ static void print_buf_lines(file_list_t *list, char *buf, fill_pathname_join_noext( core_path, settings->path.libretro_info, - extended ? core_pathname : line_start, + (extended && !string_is_empty(core_pathname)) + ? core_pathname : line_start, sizeof(core_path)); path_remove_extension(core_path);