summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-11-06 16:45:30 +0200
committerEli Zaretskii <eliz@gnu.org>2022-11-06 16:45:30 +0200
commit6cb963ff193ae351538160c2b59b623db44231ab (patch)
tree0620171037f1d2c98782f3ef3346876e982fd07c
parent9c0b90e6a927c95993a97069b28dc58c5b045e53 (diff)
downloademacs-6cb963ff193ae351538160c2b59b623db44231ab.tar.gz
; Avoid compiler warnings in 'extend_face_to_end_of_line'
* src/xdisp.c (extend_face_to_end_of_line): Return if no default_face is cached or could be realized. This avoids compilation warnings about NULL pointer dereferences.
-rw-r--r--src/xdisp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 054adb9d9d9..95da704a070 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -23156,6 +23156,9 @@ extend_face_to_end_of_line (struct it *it)
/* The default face, possibly remapped. */
struct face *default_face =
FACE_FROM_ID_OR_NULL (f, lookup_basic_face (it->w, f, DEFAULT_FACE_ID));
+ if (!default_face)
+ return;
+
const int extend_face_id =
(it->face_id == default_face->id || it->s != NULL)
? it->face_id