From 6c20006c635051b50e3b6424fbf08aa695534f7a Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 24 Jul 2024 11:59:53 +0800 Subject: [PATCH] Adapt last change to non-NS systems * src/image.c (xpm_load_image): Also check whether mask_img is NULL. (cherry picked from commit 3a76354e092f291037367b65b24c1963fd0fe31f) --- src/image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/image.c b/src/image.c index 70ec1b316ee..9d97337fd31 100644 --- a/src/image.c +++ b/src/image.c @@ -6505,7 +6505,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; -- 2.39.2