From: Andrej Gelenberg Date: Mon, 2 Aug 2010 09:59:31 +0000 (+0200) Subject: nconfig: Fix segfault when menu is empty X-Git-Tag: MMI-PSA29.97-13-9~21409^2~41 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=866af407dad3f2202e5d5d717ebd6156ccc33cdd;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.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 762caf80ce37..2ba71bcd38e6 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;