1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-23 18:47:57 +00:00

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.
This commit is contained in:
Eli Zaretskii 2023-02-24 22:46:05 +02:00
parent 244a73cd72
commit 146bce4932

View File

@ -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). */