diff options
| author | Paul Eggert | 2019-11-23 15:47:28 -0800 |
|---|---|---|
| committer | Paul Eggert | 2019-11-23 15:48:46 -0800 |
| commit | 5a3e96b17c2a948ac952295962dc6e281ec5cad5 (patch) | |
| tree | d79ea5d1d2d06ddabd604207917d70b30866b30e /src | |
| parent | 603a7c8a84a282e8610b5a5a842e5ba235d3b546 (diff) | |
| download | emacs-5a3e96b17c2a948ac952295962dc6e281ec5cad5.tar.gz emacs-5a3e96b17c2a948ac952295962dc6e281ec5cad5.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
| 21395 | { | 21395 | { |
| 21396 | const int local_default_face_id = | 21396 | const int local_default_face_id = |
| 21397 | lookup_basic_face (it->w, it->f, DEFAULT_FACE_ID); | 21397 | lookup_basic_face (it->w, it->f, DEFAULT_FACE_ID); |
| 21398 | struct face* default_face = | ||
| 21399 | FACE_FROM_ID_OR_NULL (it->f, local_default_face_id); | ||
| 21400 | 21398 | ||
| 21401 | #ifdef HAVE_WINDOW_SYSTEM | 21399 | #ifdef HAVE_WINDOW_SYSTEM |
| 21402 | if (FRAME_WINDOW_P (it->f)) | 21400 | if (FRAME_WINDOW_P (it->f)) |
| 21403 | { | 21401 | { |
| 21402 | struct face *default_face | ||
| 21403 | = FACE_FROM_ID (it->f, local_default_face_id); | ||
| 21404 | struct font *font = (default_face->font | 21404 | struct font *font = (default_face->font |
| 21405 | ? default_face->font | 21405 | ? default_face->font |
| 21406 | : FRAME_FONT (it->f)); | 21406 | : FRAME_FONT (it->f)); |