Someone calling menu_show might only be interested in the entry the user selected without having something in the action callback. Make it optional. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- common/menu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/menu.c b/common/menu.c index d516db4..ef56190 100644 --- a/common/menu.c +++ b/common/menu.c @@ -361,7 +361,8 @@ int menu_show(struct menu *m) break; clear(); gotoXY(1,1); - m->selected->action(m, m->selected); + if (m->selected->action) + m->selected->action(m, m->selected); if (m->selected->non_re_ent) return m->selected->num; else -- 1.8.3.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox