]> git.eshelyaron.com Git - emacs.git/commitdiff
Make sure to initialize glyph::frame to NULL (bug#77039)
authorGerd Möllmann <gerd.moellmann@gmail.com>
Sun, 16 Mar 2025 20:17:55 +0000 (21:17 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 17 Mar 2025 11:05:40 +0000 (12:05 +0100)
* src/dispnew.c (adjust_glyph_matrix): Clear glyph memory when
enlarging window-system window glyph matrices.

(cherry picked from commit eab14d68b2e72b9a6b8b0cc67c9667c2bfbed4f5)

src/dispnew.c

index 9b94ba1bdf003f28c933a4f06c80245b8940dd46..58817ff014bde022f5349ea88aa3e8795682a5fd 100644 (file)
@@ -506,8 +506,9 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
              row->glyphs[LEFT_MARGIN_AREA]
                = xnrealloc (row->glyphs[LEFT_MARGIN_AREA],
                             dim.width, sizeof (struct glyph));
+             memset (row->glyphs[LEFT_MARGIN_AREA], 0,
+                     dim.width * sizeof (struct glyph));
 
-             /* The mode line, if displayed, never has marginal areas.  */
              if ((row == matrix->rows + dim.height - 1
                   && !(w && window_wants_mode_line (w)))
                  || (row == matrix->rows && matrix->tab_line_p)