libgimpwidgets: don't leak dest_profile

This commit is contained in:
Simon Budig 2024-05-05 23:57:02 +02:00
parent 32336a2350
commit e0564ae69d
1 changed files with 7 additions and 3 deletions

View File

@ -1099,9 +1099,13 @@ gimp_widget_get_render_space (GtkWidget *widget,
dest_profile = gimp_widget_get_color_profile (gtk_widget_get_toplevel (widget));
if (dest_profile)
space = gimp_color_profile_get_space (dest_profile,
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
NULL);
{
space = gimp_color_profile_get_space (dest_profile,
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
NULL);
g_object_unref (dest_profile);
}
return space;
}