diff options
| author | Eli Zaretskii | 2022-11-06 16:45:30 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2022-11-06 16:45:30 +0200 |
| commit | 6cb963ff193ae351538160c2b59b623db44231ab (patch) | |
| tree | 0620171037f1d2c98782f3ef3346876e982fd07c /src | |
| parent | 9c0b90e6a927c95993a97069b28dc58c5b045e53 (diff) | |
| download | emacs-6cb963ff193ae351538160c2b59b623db44231ab.tar.gz emacs-6cb963ff193ae351538160c2b59b623db44231ab.zip | |
; 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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 3 |
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) | |||
| 23156 | /* The default face, possibly remapped. */ | 23156 | /* The default face, possibly remapped. */ |
| 23157 | struct face *default_face = | 23157 | struct face *default_face = |
| 23158 | FACE_FROM_ID_OR_NULL (f, lookup_basic_face (it->w, f, DEFAULT_FACE_ID)); | 23158 | FACE_FROM_ID_OR_NULL (f, lookup_basic_face (it->w, f, DEFAULT_FACE_ID)); |
| 23159 | if (!default_face) | ||
| 23160 | return; | ||
| 23161 | |||
| 23159 | const int extend_face_id = | 23162 | const int extend_face_id = |
| 23160 | (it->face_id == default_face->id || it->s != NULL) | 23163 | (it->face_id == default_face->id || it->s != NULL) |
| 23161 | ? it->face_id | 23164 | ? it->face_id |