]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix crash when displaying XBM images on a 32-bit visual
authorPo Lu <luangruo@yahoo.com>
Thu, 17 Feb 2022 12:44:53 +0000 (20:44 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 17 Feb 2022 12:44:53 +0000 (20:44 +0800)
* src/image.c (Create_Pixmap_From_Bitmap_Data): Fix use of wrong
(default) depth.

src/image.c

index e51132693567936431d7769cb674c518af3408fc..5c1bf8d7be673d167b72dc52b755f27b98192e59 100644 (file)
@@ -3804,7 +3804,7 @@ Create_Pixmap_From_Bitmap_Data (struct frame *f, struct image *img, char *data,
                                   data,
                                   img->width, img->height,
                                   fg, bg,
-                                  DefaultDepthOfScreen (FRAME_X_SCREEN (f)));
+                                  FRAME_DISPLAY_INFO (f)->n_planes);
 # if !defined USE_CAIRO && defined HAVE_XRENDER
   if (img->pixmap)
     img->picture = x_create_xrender_picture (f, img->pixmap, 0);