mirror of https://github.com/GNOME/gimp.git
libgimpcolor: return NULL GimpColorTransform if creating cmsHTRANSFORM fails
This commit is contained in:
parent
be8146d529
commit
d8271ed33f
|
@ -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…
Reference in New Issue