fix a gsd crash

This commit is contained in:
Matthias Clasen 2012-01-20 00:29:18 -05:00
parent 89e7802e92
commit 8447db4ae4
2 changed files with 22 additions and 1 deletions

View File

@ -1,11 +1,14 @@
Summary: Color daemon
Name: colord
Version: 0.1.16
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+ and LGPLv2+
URL: http://www.freedesktop.org/software/colord/
Source0: http://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz
# https://bugs.freedesktop.org/show_bug.cgi?id=44966
Patch0: variant-iter.patch
BuildRequires: dbus-devel
BuildRequires: docbook-utils
BuildRequires: gettext
@ -37,6 +40,7 @@ Files for development with %{name}.
%prep
%setup -q
%patch0 -p1
%build
%configure \
@ -102,6 +106,9 @@ exit 0
%{_datadir}/vala/vapi/*.vapi
%changelog
* Fri Jan 20 2012 Matthias Clasen <mclasen@redha.com> - 0.1.16-2
- Fix some obvious bugs
* Tue Jan 17 2012 Richard Hughes <richard@hughsie.com> 0.1.16-1
- New upstream version
- Now runs as a colord user rather than as root.

14
variant-iter.patch Normal file
View File

@ -0,0 +1,14 @@
diff --git a/libcolord/cd-profile.c b/libcolord/cd-profile.c
index 03decf8..95efc46 100644
--- a/libcolord/cd-profile.c
+++ b/libcolord/cd-profile.c
@@ -440,8 +440,7 @@ cd_profile_set_metadata_from_variant (CdProfile *profile, GVariant *variant)
g_hash_table_remove_all (profile->priv->metadata);
/* insert the new metadata */
- g_variant_get (variant, "a{ss}",
- &iter);
+ g_variant_init (&iter, variant);
while (g_variant_iter_loop (iter, "{ss}",
&prop_key, &prop_value)) {
g_hash_table_insert (profile->priv->metadata,