libgimpcolor: return NULL GimpColorTransform if creating cmsHTRANSFORM fails

This commit is contained in:
Michael Natterer 2016-05-30 10:58:48 +02:00
parent be8146d529
commit d8271ed33f
1 changed files with 12 additions and 0 deletions

View File

@ -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;
}