ui/nc: Handle cui_opt_data with no boot option more gracefully
authorJeremy Kerr <jk@ozlabs.org>
Tue, 7 May 2013 06:36:51 +0000 (14:36 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 9 May 2013 00:47:54 +0000 (08:47 +0800)
commit038cb53fa8e19592b9c7021176fda194799f1d51
tree61dd1a791c222d7d0cb2711a81feb93a766ae136
parent488fa97839822949f855de1efa3cf47756b7f72b
ui/nc: Handle cui_opt_data with no boot option more gracefully

We can currently segfault petitboot by escaping from the option editor
(before entering any details), then trying to boot the new, empty
option.

This change adds some sanity checks to prevent a segfault.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses/nc-cui.c