aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2023-02-24 22:46:05 +0200
committerEli Zaretskii2023-02-24 22:46:05 +0200
commit146bce49321da3b65d0a0e0326bb54cf1e79551c (patch)
tree3ba8faac5c07633bc3a76dbcd9bd8904621cc3a3 /src
parent244a73cd7292a1e10aa49618c03fc9ab801f14b9 (diff)
downloademacs-146bce49321da3b65d0a0e0326bb54cf1e79551c.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c4
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. */)
4186 if (EQ (face, Qdefault)) 4186 if (EQ (face, Qdefault))
4187 { 4187 {
4188 struct face_cache *c = FRAME_FACE_CACHE (f); 4188 struct face_cache *c = FRAME_FACE_CACHE (f);
4189 struct face *newface, *oldface = FACE_FROM_ID_OR_NULL (f, DEFAULT_FACE_ID); 4189 struct face *newface;
4190 struct face *oldface =
4191 c ? FACE_FROM_ID_OR_NULL (f, DEFAULT_FACE_ID) : NULL;
4190 Lisp_Object attrs[LFACE_VECTOR_SIZE]; 4192 Lisp_Object attrs[LFACE_VECTOR_SIZE];
4191 4193
4192 /* This can be NULL (e.g., in batch mode). */ 4194 /* This can be NULL (e.g., in batch mode). */