diff --git a/0001-Don-t-fall-over-if-RANDR-is-missing.patch b/0001-Don-t-fall-over-if-RANDR-is-missing.patch new file mode 100644 index 0000000..5402a20 --- /dev/null +++ b/0001-Don-t-fall-over-if-RANDR-is-missing.patch @@ -0,0 +1,30 @@ +From aa93854f2ba6b0f72f1bdff9699b5724a72c89c9 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Sat, 30 Apr 2011 20:48:03 -0400 +Subject: [PATCH] Don't fall over if RANDR is missing + +When RANDR is not present, the screen object never gets an info, +and since screen_info_free asserts, we must not call it unconditionally +in finalize. +This fixes https://bugzilla.gnome.org/show_bug.cgi?id=649053 +--- + libgnome-desktop/gnome-rr.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c +index 4a9d98e..eb3d735 100644 +--- a/libgnome-desktop/gnome-rr.c ++++ b/libgnome-desktop/gnome-rr.c +@@ -748,7 +748,8 @@ gnome_rr_screen_finalize (GObject *gobject) + + gdk_window_remove_filter (screen->priv->gdk_root, screen_on_event, screen); + +- screen_info_free (screen->priv->info); ++ if (screen->priv->info) ++ screen_info_free (screen->priv->info); + + G_OBJECT_CLASS (gnome_rr_screen_parent_class)->finalize (gobject); + } +-- +1.7.5 + diff --git a/gnome-desktop3.spec b/gnome-desktop3.spec index 5675433..cda15c6 100644 --- a/gnome-desktop3.spec +++ b/gnome-desktop3.spec @@ -10,9 +10,13 @@ Summary: Shared code among gnome-panel, gnome-session, nautilus, etc Name: gnome-desktop3 Version: 3.0.1 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.gnome.org Source0: http://download.gnome.org/sources/gnome-desktop/3.0/gnome-desktop-%{version}.tar.bz2 + +# Upstream fix +Patch0: 0001-Don-t-fall-over-if-RANDR-is-missing.patch + License: GPLv2+ and LGPLv2+ Group: System Environment/Libraries @@ -67,6 +71,7 @@ libgnomedesktop. %prep %setup -q -n gnome-desktop-%{version} +%patch0 -p1 -b .randr-missing %build %configure --with-pnp-ids-path="/usr/share/hwdata/pnp.ids" \ @@ -104,6 +109,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.a %doc %{_datadir}/gtk-doc/html/gnome-desktop3/ %changelog +* Mon May 2 2011 Matthias Clasen - 3.0.1-2 +- Prevent segfaults in gnome-rr users on randr-less displays + * Tue Apr 26 2011 Matthias Clasen - 3.0.1-1 - Update to 3.0.1