summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2013-07-03 12:08:48 +0100
committerRichard Hughes <richard@hughsie.com>2013-07-03 12:08:48 +0100
commitf688a77d2eeb8a238182af7dbcaf2d45e05aba24 (patch)
tree581240912450ac6fe462963470bf33993659c904
parent612606c1f6cd404cc9b507f97e9ad25e6037cc04 (diff)
downloadcolord-f688a77d2eeb8a238182af7dbcaf2d45e05aba24.tar.gz
Fix critical warning when trying to use cd_edid_install_profile()
-rw-r--r--lib/compat/cd-edid.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/compat/cd-edid.c b/lib/compat/cd-edid.c
index ff5f40a..5aa6793 100644
--- a/lib/compat/cd-edid.c
+++ b/lib/compat/cd-edid.c
@@ -130,6 +130,15 @@ cd_edid_install_profile (unsigned char *edid,
goto out;
}
+ /* read profile properties */
+ ret = cd_profile_connect_sync (profile, NULL, &error);
+ if (!ret) {
+ rc = CD_EDID_ERROR_ACCESS_CONFIG;
+ g_warning ("profile disappeared: %s", error->message);
+ g_error_free (error);
+ goto out;
+ }
+
/* add profile to device */
ret = cd_device_add_profile_sync (device,
CD_DEVICE_RELATION_HARD,