* grub-core/normal/context.c (grub_env_extractor_close): Don't crash

if no submenu is present.
This commit is contained in:
Seth Goldberg 2012-02-01 15:35:30 +01:00 committed by Vladimir 'phcoder' Serbinenko
parent fc9b5652f6
commit 3008675bea
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2012-02-01 Seth Goldberg <seth.goldberg@oracle.com>
* grub-core/normal/context.c (grub_env_extractor_close): Don't crash
if no submenu is present.
2012-02-01 Aleš Nesrsta <starous@volny.cz>
CBI support.

View file

@ -159,7 +159,7 @@ grub_env_extractor_close (int source)
}
err = grub_env_context_close ();
if (source)
if (source && menu)
{
grub_menu_t menu2;
menu2 = grub_env_get_menu ();