File 0014-fix-booting-without-vga.patch of Package grub
--- a/efi/graphics.c 2014-08-28 09:43:41.855973525 -0500
+++ b/efi/graphics.c 2014-08-28 09:47:57.162973491 -0500
@@ -370,13 +370,15 @@
text = graphics_get_text_buf();
linesz = screensz.x * sizeof (text[0]);
- for (i = 1; i < screensz.y; i++) {
- unsigned short *prev = &text[(i-1) * screensz.x];
- unsigned short *this = prev + screensz.x;
-
- memmove(prev, this, linesz);
- prev = this;
- this += screensz.x;
+ if (text) {
+ for (i = 1; i < screensz.y; i++) {
+ unsigned short *prev = &text[(i-1) * screensz.x];
+ unsigned short *this = prev + screensz.x;
+
+ memmove(prev, this, linesz);
+ prev = this;
+ this += screensz.x;
+ }
}
graphics_setxy(0, screensz.y - 1);
for (i = 0; i < screensz.x; i++) {
@@ -420,9 +422,11 @@
graphics_get_screen_rowscols(&screensz);
text = graphics_get_text_buf();
- for (y = 0; y < screensz.y; y++)
+ if (text) {
+ for (y = 0; y < screensz.y; y++)
for (x = 0; x < screensz.x; x++)
text[x + y * screensz.x] = ' ';
+ }
if (backend) {
//int xy = graphics_getxy();
@@ -551,6 +555,7 @@
}
backend->graphics = NULL;
}
+ backend = 0;
grub_free(graphics->text);
grub_free(graphics);
return 0;