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>
This commit is contained in:
parent
a64b44ead0
commit
866af407da
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user