diff options
author | Stefan Kangas <stefan@marxist.se> | 2022-01-15 06:47:59 +0100 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2022-01-15 06:47:59 +0100 |
commit | 8df828e40522b7696cde6ec22a4657173c9f02a1 (patch) | |
tree | a81313af02b62afbc759ed328b08e01e4c439eff /src/xfaces.c | |
parent | 8267973c3110dbcbf2c1120f73159ad2ef8c57a0 (diff) | |
parent | 5990148860094bc3ad0ec55e4edac543d1c2036e (diff) | |
download | emacs-8df828e40522b7696cde6ec22a4657173c9f02a1.tar.gz |
Merge from origin/emacs-28
5990148860 * lisp/simple.el (undo-no-redo): Fix customization group
ac2cdb8a46 * lisp/progmodes/xref.el (xref-file-name-display): Fix doc...
c05864dd25 Avoid another segfault in 'face_at_buffer_position'
Diffstat (limited to 'src/xfaces.c')
-rw-r--r-- | src/xfaces.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index 8064d47c947..e148b5d3987 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6423,8 +6423,12 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos, cached faces since we've looked up these faces, we need to look them up again. */ if (!default_face) - default_face = FACE_FROM_ID (f, - lookup_basic_face (w, f, DEFAULT_FACE_ID)); + { + if (FRAME_FACE_CACHE (f)->used == 0) + recompute_basic_faces (f); + default_face = FACE_FROM_ID (f, + lookup_basic_face (w, f, DEFAULT_FACE_ID)); + } } /* Optimize common cases where we can use the default face. */ |