* font/font.c (find_glyph): Check that bmp_idx is available before
using it.
(grub_font_get_string_width): Never call grub_font_get_glyph_internal
with (font == NULL).
+2010-01-31 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * font/font.c (find_glyph): Check that bmp_idx is available before
+ using it.
+ (grub_font_get_string_width): Never call grub_font_get_glyph_internal
+ with (font == NULL).
+
2010-01-28 Christian Schmitt <chris@ilovelinux.de>
* util/ieee1275/grub-install.in: Fix nvsetenv arguments.
table = font->char_index;
/* Use BMP index if possible. */
- if (code < 0x10000)
+ if (code < 0x10000 && font->bmp_idx)
{
if (font->bmp_idx[code] == 0xffff)
return 0;
struct grub_font_glyph *
grub_font_get_glyph (grub_font_t font, grub_uint32_t code)
{
- struct grub_font_glyph *glyph;
- glyph = grub_font_get_glyph_internal (font, code);
+ struct grub_font_glyph *glyph = 0;
+ if (font)
+ glyph = grub_font_get_glyph_internal (font, code);
if (glyph == 0)
{
glyph = ascii_glyph_lookup (code);