Commit 866af407 authored by Andrej Gelenberg's avatar Andrej Gelenberg Committed by Michal Marek

nconfig: Fix segfault when menu is empty

nconf crush with segfault if press right arrow in empty menu.
Signed-off-by: default avatarAndrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent a64b44ea
...@@ -676,6 +676,8 @@ static void *item_data(void) ...@@ -676,6 +676,8 @@ static void *item_data(void)
struct mitem *mcur; struct mitem *mcur;
cur = current_item(curses_menu); cur = current_item(curses_menu);
if (!cur)
return NULL;
mcur = (struct mitem *) item_userptr(cur); mcur = (struct mitem *) item_userptr(cur);
return mcur->usrptr; return mcur->usrptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment