emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 146bce49321: Avoid crashes in batch mode due to lack of frame f


From: Eli Zaretskii
Subject: emacs-29 146bce49321: Avoid crashes in batch mode due to lack of frame face cache
Date: Fri, 24 Feb 2023 15:47:20 -0500 (EST)

branch: emacs-29
commit 146bce49321da3b65d0a0e0326bb54cf1e79551c
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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.
---
 src/xfaces.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]