mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
libgimpcolor: return NULL GimpColorTransform if creating cmsHTRANSFORM fails
This commit is contained in:
parent
be8146d529
commit
d8271ed33f
1 changed files with 12 additions and 0 deletions
|
@ -200,6 +200,12 @@ gimp_color_transform_new (GimpColorProfile *src_profile,
|
|||
rendering_intent,
|
||||
flags | cmsFLAGS_NOOPTIMIZE);
|
||||
|
||||
if (! priv->transform)
|
||||
{
|
||||
g_object_unref (transform);
|
||||
transform = NULL;
|
||||
}
|
||||
|
||||
return transform;
|
||||
}
|
||||
|
||||
|
@ -264,6 +270,12 @@ gimp_color_transform_new_proofing (GimpColorProfile *src_profile,
|
|||
display_intent,
|
||||
flags | cmsFLAGS_SOFTPROOFING);
|
||||
|
||||
if (! priv->transform)
|
||||
{
|
||||
g_object_unref (transform);
|
||||
transform = NULL;
|
||||
}
|
||||
|
||||
return transform;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue