From: Eli Zaretskii Date: Sun, 6 Nov 2022 14:45:30 +0000 (+0200) Subject: ; Avoid compiler warnings in 'extend_face_to_end_of_line' X-Git-Tag: emacs-29.0.90~1616^2~257 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6cb963ff193ae351538160c2b59b623db44231ab;p=emacs.git ; 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. --- 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