]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/normal/context.c (grub_env_extractor_close): Don't crash
authorSeth Goldberg <seth.goldberg@oracle.com>
Wed, 1 Feb 2012 14:35:30 +0000 (15:35 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 1 Feb 2012 14:35:30 +0000 (15:35 +0100)
if no submenu is present.

ChangeLog
grub-core/normal/context.c

index 7be34e64cf2dc255d3f398dc836fe065f4741f34..47f12a5be3c0e04a03db069f5f65241b330ab56c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 58131660388240b16e312ac6a459fd431c91e8b2..b85f7c61c4341a48ef64801340f942806f586a12 100644 (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 ();