Skip to content

Commit

Permalink
nconfig: Fix segfault when menu is empty
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrej Gelenberg authored and Michal Marek committed Aug 12, 2010
1 parent a64b44e commit 866af40
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/kconfig/nconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 866af40

Please sign in to comment.