aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrej Gelenberg <andrej.gelenberg@udo.edu>2010-08-02 05:59:31 -0400
committerMichal Marek <mmarek@suse.cz>2010-08-12 18:34:15 -0400
commit866af407dad3f2202e5d5d717ebd6156ccc33cdd (patch)
tree56e902d33f8e3dd814053f91bfd3c0a34aa8db6d
parenta64b44ead002ba15fdf841106a6fd344b8dd46d8 (diff)
nconfig: Fix segfault when menu is empty
nconf crush with segfault if press right arrow in empty menu. Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu> Signed-off-by: Michal Marek <mmarek@suse.cz>
-rw-r--r--scripts/kconfig/nconf.c2
1 files changed, 2 insertions, 0 deletions
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)
676 struct mitem *mcur; 676 struct mitem *mcur;
677 677
678 cur = current_item(curses_menu); 678 cur = current_item(curses_menu);
679 if (!cur)
680 return NULL;
679 mcur = (struct mitem *) item_userptr(cur); 681 mcur = (struct mitem *) item_userptr(cur);
680 return mcur->usrptr; 682 return mcur->usrptr;
681 683