diff options
| author | Eli Zaretskii | 2016-05-24 19:04:16 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-05-24 19:04:16 +0300 |
| commit | fbfd4787fbec11fe69f5e661e7c5ab4436f7cb72 (patch) | |
| tree | 32571d8aa97de826a30be7da755b4b618bfb8023 | |
| parent | bdfbe6deff52bbf820b0fa1a5ea78b89963e5738 (diff) | |
| download | emacs-fbfd4787fbec11fe69f5e661e7c5ab4436f7cb72.tar.gz emacs-fbfd4787fbec11fe69f5e661e7c5ab4436f7cb72.zip | |
Avoid aborting due to errors in arguments of 'set-face-attribute'
* 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.
| -rw-r--r-- | src/xfaces.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index ac1370003df..88f5f3415b0 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -2678,9 +2678,10 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 2678 | { | 2678 | { |
| 2679 | if (NILP (frame)) | 2679 | if (NILP (frame)) |
| 2680 | frame = selected_frame; | 2680 | frame = selected_frame; |
| 2681 | f = XFRAME (frame); | ||
| 2682 | 2681 | ||
| 2683 | CHECK_LIVE_FRAME (frame); | 2682 | CHECK_LIVE_FRAME (frame); |
| 2683 | f = XFRAME (frame); | ||
| 2684 | |||
| 2684 | lface = lface_from_face_name (f, face, false); | 2685 | lface = lface_from_face_name (f, face, false); |
| 2685 | 2686 | ||
| 2686 | /* If a frame-local face doesn't exist yet, create one. */ | 2687 | /* If a frame-local face doesn't exist yet, create one. */ |