2007-11-10 Christian Franke <franke@computer.org>
* normal/menu.c (run_menu): Check for empty menu to avoid crash. (grub_menu_run): Likewise.
This commit is contained in:
parent
ce0f1839a5
commit
8b714eb0e1
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-11-10 Christian Franke <franke@computer.org>
|
||||
|
||||
* normal/menu.c (run_menu): Check for empty menu to avoid crash.
|
||||
(grub_menu_run): Likewise.
|
||||
|
||||
2007-11-10 Robert Millan <rmh@aybabtu.com>
|
||||
|
||||
* include/grub/i386/efi/machine.h: New file.
|
||||
|
|
|
@ -412,7 +412,11 @@ run_menu (grub_menu_t menu, int nested)
|
|||
goto refresh;
|
||||
|
||||
case 'e':
|
||||
grub_menu_entry_run (get_entry (menu, first + offset));
|
||||
{
|
||||
grub_menu_entry_t e = get_entry (menu, first + offset);
|
||||
if (e)
|
||||
grub_menu_entry_run (e);
|
||||
}
|
||||
goto refresh;
|
||||
|
||||
default:
|
||||
|
@ -451,10 +455,13 @@ grub_menu_run (grub_menu_t menu, int nested)
|
|||
if (boot_entry < 0)
|
||||
break;
|
||||
|
||||
e = get_entry (menu, boot_entry);
|
||||
if (! e)
|
||||
continue; /* Menu is empty. */
|
||||
|
||||
grub_cls ();
|
||||
grub_setcursor (1);
|
||||
|
||||
e = get_entry (menu, boot_entry);
|
||||
grub_printf (" Booting \'%s\'\n\n", e->title);
|
||||
|
||||
run_menu_entry (e);
|
||||
|
|
Loading…
Reference in a new issue