Commit 075f21c0 authored by YAMAMOTO Mitsuharu's avatar YAMAMOTO Mitsuharu

Avoid crash by access to cleared img->pixmap->data/img->mask->data (Bug#38774)

* src/image.c (prepare_image_for_display) [USE_CAIRO]: Call IMAGE_BACKGROUND
and IMAGE_BACKGROUND_TRANSPARENT.
parent 16c6dfb4
......@@ -1242,6 +1242,10 @@ prepare_image_for_display (struct frame *f, struct image *img)
if (img->cr_data == NULL || (cairo_pattern_get_type (img->cr_data)
!= CAIRO_PATTERN_TYPE_SURFACE))
{
/* Fill in the background/background_transparent field while
we have img->pixmap->data/img->mask->data. */
IMAGE_BACKGROUND (img, f, img->pixmap);
IMAGE_BACKGROUND_TRANSPARENT (img, f, img->mask);
cr_put_image_to_cr_data (img);
if (img->cr_data == NULL)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment