Skip to content

Commit 866af40

Browse files
nikel123michal42
authored andcommitted
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>
1 parent a64b44e commit 866af40

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎scripts/kconfig/nconf.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,8 @@ static void *item_data(void)
676676
struct mitem *mcur;
677677

678678
cur = current_item(curses_menu);
679+
if (!cur)
680+
return NULL;
679681
mcur = (struct mitem *) item_userptr(cur);
680682
return mcur->usrptr;
681683

0 commit comments

Comments
 (0)