From: Paul Eggert Date: Sat, 23 Nov 2019 23:47:28 +0000 (-0800) Subject: Add eassert check for bad default face X-Git-Tag: emacs-27.0.90~535 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5a3e96b17c2a948ac952295962dc6e281ec5cad5;p=emacs.git Add eassert check for bad default face * 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. --- diff --git a/src/xdisp.c b/src/xdisp.c index 593aaa73ac9..2b4dda27157 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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));