]> code.delx.au - gnu-emacs/commitdiff
Avoid aborting due to errors in arguments of 'set-face-attribute'
authorEli Zaretskii <eliz@gnu.org>
Tue, 24 May 2016 16:04:16 +0000 (19:04 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 24 May 2016 16:04:16 +0000 (19:04 +0300)
* src/xfaces.c (Finternal_set_lisp_face_attribute): Check the
FRAME argument before using it.  This avoids gratuitous aborts in
Emacs built with --enable-checking when the luser was unlucky
enough to get the argument list in wrong order.

src/xfaces.c

index ac1370003dfaa4af6a68386fe81f13468d6206d1..88f5f3415b05f120198bcdb15dbe4bb27fd693ce 100644 (file)
@@ -2678,9 +2678,10 @@ FRAME 0 means change the face on all frames, and change the default
     {
       if (NILP (frame))
        frame = selected_frame;
-      f = XFRAME (frame);
 
       CHECK_LIVE_FRAME (frame);
+      f = XFRAME (frame);
+
       lface = lface_from_face_name (f, face, false);
 
       /* If a frame-local face doesn't exist yet, create one.  */