diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-02-24 22:46:05 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-02-24 22:46:05 +0200 |
commit | 146bce49321da3b65d0a0e0326bb54cf1e79551c (patch) | |
tree | 3ba8faac5c07633bc3a76dbcd9bd8904621cc3a3 | |
parent | 244a73cd7292a1e10aa49618c03fc9ab801f14b9 (diff) | |
download | emacs-146bce49321da3b65d0a0e0326bb54cf1e79551c.tar.gz emacs-146bce49321da3b65d0a0e0326bb54cf1e79551c.tar.bz2 emacs-146bce49321da3b65d0a0e0326bb54cf1e79551c.zip |
Avoid crashes in batch mode due to lack of frame face cache
* src/xfaces.c (Finternal_merge_in_global_face): Handle frames
with no face cache.
-rw-r--r-- | src/xfaces.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index 62d7823f308..37b703984be 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -4186,7 +4186,9 @@ Default face attributes override any local face attributes. */) if (EQ (face, Qdefault)) { struct face_cache *c = FRAME_FACE_CACHE (f); - struct face *newface, *oldface = FACE_FROM_ID_OR_NULL (f, DEFAULT_FACE_ID); + struct face *newface; + struct face *oldface = + c ? FACE_FROM_ID_OR_NULL (f, DEFAULT_FACE_ID) : NULL; Lisp_Object attrs[LFACE_VECTOR_SIZE]; /* This can be NULL (e.g., in batch mode). */ |