Commit d8271ed3 authored by Michael Natterer's avatar Michael Natterer 😴

libgimpcolor: return NULL GimpColorTransform if creating cmsHTRANSFORM fails

parent be8146d5
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment