diff options
| author | Paul Eggert | 2016-05-19 08:38:55 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-05-19 08:39:20 -0700 |
| commit | e8a28b295fabbc249c5123b58fcf2beb82f08da2 (patch) | |
| tree | 6b5f7de8eb459910d4bb3358962ed09c344fc1f1 /src/dispextern.h | |
| parent | 40108979821637104d2ece39af8a27068544d3bd (diff) | |
| download | emacs-e8a28b295fabbc249c5123b58fcf2beb82f08da2.tar.gz emacs-e8a28b295fabbc249c5123b58fcf2beb82f08da2.zip | |
Allow null entries in face and image cache
Problem reported by Tino Calancha (Bug#23580).
* src/dispextern.h (FACE_FROM_ID, IMAGE_FROM_ID):
Don’t assume that the result is non-null.
* src/xdisp.c (fill_image_glyph_string):
Restore check that image pointer is non-null.
Diffstat (limited to 'src/dispextern.h')
| -rw-r--r-- | src/dispextern.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index 4deebc146c8..e83b7c7fc83 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1815,7 +1815,6 @@ struct face_cache | |||
| 1815 | 1815 | ||
| 1816 | #define FACE_FROM_ID(F, ID) \ | 1816 | #define FACE_FROM_ID(F, ID) \ |
| 1817 | (eassert (UNSIGNED_CMP (ID, <, FRAME_FACE_CACHE (F)->used)), \ | 1817 | (eassert (UNSIGNED_CMP (ID, <, FRAME_FACE_CACHE (F)->used)), \ |
| 1818 | eassume (FRAME_FACE_CACHE (F)->faces_by_id[ID]), \ | ||
| 1819 | FRAME_FACE_CACHE (F)->faces_by_id[ID]) | 1818 | FRAME_FACE_CACHE (F)->faces_by_id[ID]) |
| 1820 | 1819 | ||
| 1821 | /* Return a pointer to the face with ID on frame F, or null if such a | 1820 | /* Return a pointer to the face with ID on frame F, or null if such a |
| @@ -3093,7 +3092,6 @@ struct image_cache | |||
| 3093 | 3092 | ||
| 3094 | #define IMAGE_FROM_ID(F, ID) \ | 3093 | #define IMAGE_FROM_ID(F, ID) \ |
| 3095 | (eassert (UNSIGNED_CMP (ID, <, FRAME_IMAGE_CACHE (F)->used)), \ | 3094 | (eassert (UNSIGNED_CMP (ID, <, FRAME_IMAGE_CACHE (F)->used)), \ |
| 3096 | eassume (FRAME_IMAGE_CACHE (F)->images[ID]), \ | ||
| 3097 | FRAME_IMAGE_CACHE (F)->images[ID]) | 3095 | FRAME_IMAGE_CACHE (F)->images[ID]) |
| 3098 | 3096 | ||
| 3099 | /* Value is a pointer to the image with id ID on frame F, or null if | 3097 | /* Value is a pointer to the image with id ID on frame F, or null if |