summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-02-13 08:49:53 +0000
committerRichard Hughes <richard@hughsie.com>2014-02-13 19:21:50 +0000
commit7bc3952e6ff9b6b15e5980fc74cb543d35150c7a (patch)
treede6d1c383d8f414428272a07e930f764fb9f0cec /lib
parentff20ade6bf0da2064798fd52b0557dc69c06ee28 (diff)
downloadcolord-7bc3952e6ff9b6b15e5980fc74cb543d35150c7a.tar.gz
libcolord: Load the profile defaults when using cd_icc_create_default()
This prevents a crash with LCMS 2.6 when we try to write a profile with no version.
Diffstat (limited to 'lib')
-rw-r--r--lib/colord/cd-icc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/colord/cd-icc.c b/lib/colord/cd-icc.c
index 07d1097..a98e031 100644
--- a/lib/colord/cd-icc.c
+++ b/lib/colord/cd-icc.c
@@ -3363,6 +3363,11 @@ cd_icc_create_default (CdIcc *icc, GError **error)
goto out;
}
+ /* get defaults from profile */
+ ret = cd_icc_load (icc, 0, error);
+ if (!ret)
+ goto out;
+
/* set any extra profile metadata */
cd_icc_add_metadata (icc,
CD_PROFILE_METADATA_DATA_SOURCE,