From: Andrej Gelenberg Date: Mon, 2 Aug 2010 09:59:31 +0000 (+0200) Subject: nconfig: Fix segfault when menu is empty X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=866af407dad3f2202e5d5d717ebd6156ccc33cdd;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git nconfig: Fix segfault when menu is empty nconf crush with segfault if press right arrow in empty menu. Signed-off-by: Andrej Gelenberg Signed-off-by: Michal Marek --- diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index 762caf80ce3..2ba71bcd38e 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -676,6 +676,8 @@ static void *item_data(void) struct mitem *mcur; cur = current_item(curses_menu); + if (!cur) + return NULL; mcur = (struct mitem *) item_userptr(cur); return mcur->usrptr;