Commit ea67537d authored by Jehan's avatar Jehan

app: conditionnally free new profile in gimp_image_convert_precision().

Do not free a NULL pointer! This fixes a CRITICAL:
> g_object_unref: assertion 'G_IS_OBJECT (object)' failed
parent 6c6a7514
......@@ -191,11 +191,14 @@ gimp_image_convert_precision (GimpImage *image,
}
if (new_profile)
gimp_image_set_color_profile (image, new_profile, NULL);
{
gimp_image_set_color_profile (image, new_profile, NULL);
g_object_unref (new_profile);
}
else
gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (image));
g_object_unref (new_profile);
{
gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (image));
}
gimp_image_undo_group_end (image);
......
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