]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix compilation of image.c on non-Cairo systems
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 11 Dec 2020 15:02:50 +0000 (16:02 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 11 Dec 2020 15:02:54 +0000 (16:02 +0100)
* src/image.c (image_frame_cache_size): pixmap->width etc is only
defined on Cairo.  Return 0 for now on other systems.

src/image.c

index 38887ced25b2fbddad3957847bf9c5678dd85d10..8607b33a7a86b861ad85e9240f2a50987f1e5343 100644 (file)
@@ -1805,9 +1805,11 @@ image_frame_cache_size (struct frame *f)
     {
       struct image *img = c->images[i];
 
+#ifdef USE_CAIRO
       if (img)
        total += img->pixmap->width * img->pixmap->height  *
          img->pixmap->bits_per_pixel / 8;
+#endif
     }
   return total;
 }