From 7982a5d18c14813fdfaab1f86c116bd400e9ac9e Mon Sep 17 00:00:00 2001 From: Jehan Date: Thu, 5 Aug 2021 18:53:15 +0200 Subject: [PATCH] Issue #5386: Gimp crashes when setting AdobeRGB image to Indexed colors. Similar to the fix of commit c0e605ef for RGB images with a profile as notified by Massimo. --- app/core/gimpimage-convert-indexed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/core/gimpimage-convert-indexed.c b/app/core/gimpimage-convert-indexed.c index 3295863d95..e1e758557a 100644 --- a/app/core/gimpimage-convert-indexed.c +++ b/app/core/gimpimage-convert-indexed.c @@ -1203,8 +1203,8 @@ generate_histogram_rgb (CFHistogram histogram, format = gimp_drawable_get_format (GIMP_DRAWABLE (layer)); - g_return_if_fail (format == babl_format ("R'G'B' u8") || - format == babl_format ("R'G'B'A u8")); + g_return_if_fail (format == babl_format_with_space ("R'G'B' u8", format) || + format == babl_format_with_space ("R'G'B'A u8", format)); bpp = babl_format_get_bytes_per_pixel (format); has_alpha = babl_format_has_alpha (format);