From 6cb963ff193ae351538160c2b59b623db44231ab Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 6 Nov 2022 16:45:30 +0200 Subject: [PATCH] ; 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. --- src/xdisp.c | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.39.2