Adapt last change to non-NS systems
authorPo Lu <luangruo@yahoo.com>
Wed, 24 Jul 2024 03:59:53 +0000 (11:59 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 24 Jul 2024 03:59:53 +0000 (11:59 +0800)
* src/image.c (xpm_load_image): Also check whether mask_img is
NULL.

src/image.c

index f869a95c15dfb2a159100996397ba03792252d4a..96280f3ef466b6272f92a53f8a3dba066b319795 100644 (file)
@@ -6508,7 +6508,8 @@ xpm_load_image (struct frame *f,
   if (ximg)
     {
       image_destroy_x_image (ximg);
-      image_destroy_x_image (mask_img);
+      if (mask_img)
+       image_destroy_x_image (mask_img);
       image_clear_image (f, img);
     }
   return 0;