]> code.delx.au - gnu-emacs/commitdiff
Allocate glyph matrices for the initial frame
authorChris Feng <chris.w.feng@gmail.com>
Wed, 24 Feb 2016 07:58:02 +0000 (08:58 +0100)
committerMartin Rudalics <rudalics@gmx.at>
Wed, 24 Feb 2016 07:58:02 +0000 (08:58 +0100)
* src/frame.c (make_initial_frame): Allocate glyph matrices (Bug#22787).

* src/dispnew.c (clear_glyph_matrix_rows): matrix->nrows can be 0.

Copyright-paperwork-exempt: yes

src/dispnew.c
src/frame.c

index 433a6e9ed4a4d5b31e4fdb0e891fa5321b4dbfbc..f96db302781bba543bb451f0d070d1d3b1a9cb6f 100644 (file)
@@ -683,7 +683,7 @@ void
 clear_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end)
 {
   eassert (start <= end);
-  eassert (start >= 0 && start < matrix->nrows);
+  eassert (start >= 0 && start <= matrix->nrows);
   eassert (end >= 0 && end <= matrix->nrows);
 
   for (; start < end; ++start)
index 8c86afe4efb62ce6a718501cffee497c8f9df54d..4f61332ace1f2a000cabdd18c1dfc018acc40d54 100644 (file)
@@ -867,6 +867,9 @@ make_initial_frame (void)
   /* The default value of menu-bar-mode is t.  */
   set_menu_bar_lines (f, make_number (1), Qnil);
 
+  /* Allocate glyph matrices.  */
+  adjust_frame_glyphs (f);
+
   if (!noninteractive)
     init_frame_faces (f);