diff options
Diffstat (limited to 'src/dispnew.c')
-rw-r--r-- | src/dispnew.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 51caa5b10e7..4cc908a3c2a 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5177,8 +5177,8 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p #ifdef HAVE_WINDOW_SYSTEM if (it.what == IT_IMAGE) { - if ((img = IMAGE_FROM_ID (it.f, it.image_id)) != NULL - && !NILP (img->spec)) + img = IMAGE_OPT_FROM_ID (it.f, it.image_id); + if (img && !NILP (img->spec)) *object = img->spec; } #endif @@ -5275,7 +5275,7 @@ mode_line_string (struct window *w, enum window_part part, if (glyph->type == IMAGE_GLYPH) { struct image *img; - img = IMAGE_FROM_ID (WINDOW_XFRAME (w), glyph->u.img_id); + img = IMAGE_OPT_FROM_ID (WINDOW_XFRAME (w), glyph->u.img_id); if (img != NULL) *object = img->spec; y0 -= row->ascent - glyph->ascent; @@ -5362,7 +5362,7 @@ marginal_area_string (struct window *w, enum window_part part, if (glyph->type == IMAGE_GLYPH) { struct image *img; - img = IMAGE_FROM_ID (WINDOW_XFRAME (w), glyph->u.img_id); + img = IMAGE_OPT_FROM_ID (WINDOW_XFRAME (w), glyph->u.img_id); if (img != NULL) *object = img->spec; y0 -= row->ascent - glyph->ascent; |