Push error before calling grub_gfxterm_fullscreen

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-01-06 10:50:50 +01:00
parent 4d253049d5
commit 2ab4515528

View file

@ -57,21 +57,27 @@ grub_gfxmenu_try (int entry, grub_menu_t menu, int nested)
theme_path = grub_env_get ("theme");
if (! theme_path)
{
grub_error_push ();
grub_gfxterm_fullscreen ();
grub_error_pop ();
return grub_error (GRUB_ERR_FILE_NOT_FOUND, "no theme specified");
}
instance = grub_zalloc (sizeof (*instance));
if (!instance)
{
grub_error_push ();
grub_gfxterm_fullscreen ();
grub_error_pop ();
return grub_errno;
}
err = grub_video_get_info (&mode_info);
if (err)
{
grub_error_push ();
grub_gfxterm_fullscreen ();
grub_error_pop ();
return err;
}
@ -88,7 +94,9 @@ grub_gfxmenu_try (int entry, grub_menu_t menu, int nested)
if (! cached_view)
{
grub_free (instance);
grub_error_push ();
grub_gfxterm_fullscreen ();
grub_error_pop ();
return grub_errno;
}