mirror of https://github.com/GNOME/gimp.git
Bug 709857 - Lcms plugin crashes if RGB profile does not exist
Always check the return value of lcms_load_profile(config->rgb_profile) and use the builtin sRGB profile if it returns NULL.
This commit is contained in:
parent
48582d4d6a
commit
961d03d795
|
@ -1481,7 +1481,7 @@ lcms_icc_combo_box_new (GimpColorConfig *config,
|
|||
gchar *history;
|
||||
gchar *label;
|
||||
gchar *name;
|
||||
cmsHPROFILE profile;
|
||||
cmsHPROFILE profile = NULL;
|
||||
|
||||
dialog = lcms_icc_file_chooser_dialog_new ();
|
||||
history = gimp_personal_rc_file ("profilerc");
|
||||
|
@ -1496,7 +1496,8 @@ lcms_icc_combo_box_new (GimpColorConfig *config,
|
|||
|
||||
if (config->rgb_profile)
|
||||
profile = lcms_load_profile (config->rgb_profile, NULL);
|
||||
else
|
||||
|
||||
if (! profile)
|
||||
profile = cmsCreate_sRGBProfile ();
|
||||
|
||||
name = lcms_icc_profile_get_desc (profile);
|
||||
|
|
Loading…
Reference in New Issue