]> git.eshelyaron.com Git - emacs.git/commitdiff
Add eassert check for bad default face
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 Nov 2019 23:47:28 +0000 (15:47 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 Nov 2019 23:48:46 +0000 (15:48 -0800)
* src/xdisp.c (append_space_for_newline): Add an eassert check
that default_face is not null, by calling FACE_FROM_ID instead of
FACE_FROM_ID_OR_NULL.  Initialize a local only if needed.

src/xdisp.c

index 593aaa73ac98579157743f890dddc7c754ff0422..2b4dda271572c626f1ddf6b15870e5900e6397a3 100644 (file)
@@ -21395,12 +21395,12 @@ append_space_for_newline (struct it *it, bool default_face_p)
        {
          const int local_default_face_id =
            lookup_basic_face (it->w, it->f, DEFAULT_FACE_ID);
-         struct face* default_face =
-           FACE_FROM_ID_OR_NULL (it->f, local_default_face_id);
 
 #ifdef HAVE_WINDOW_SYSTEM
          if (FRAME_WINDOW_P (it->f))
            {
+             struct face *default_face
+               = FACE_FROM_ID (it->f, local_default_face_id);
              struct font *font = (default_face->font
                                   ? default_face->font
                                   : FRAME_FONT (it->f));