fix a crash
This commit is contained in:
parent
51ba49ae7d
commit
8a9c1e1faf
@ -12,7 +12,7 @@
|
||||
Summary: GNOME session manager
|
||||
Name: gnome-session
|
||||
Version: 2.23.2.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
URL: http://www.gnome.org
|
||||
Source0: http://download.gnome.org/sources/gnome-session/2.23/%{name}-%{version}.tar.bz2
|
||||
Source1: redhat-default-session
|
||||
@ -53,6 +53,9 @@ Patch13: gnome-session-2.17.5-window-manager.patch
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=475468
|
||||
Patch22: ice-leaks.patch
|
||||
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=533351
|
||||
Patch33: legacy-crash.patch
|
||||
|
||||
BuildRequires: libgnomeui-devel >= %{libgnomeui_version}
|
||||
BuildRequires: gtk2-devel >= %{gtk2_version}
|
||||
BuildRequires: dbus-devel >= %{dbus_version}
|
||||
@ -95,6 +98,7 @@ GNOME components and handles logout and saving the session.
|
||||
#%patch20 -p1 -b .timeout
|
||||
#%patch21 -p0 -b .use-gdm-hints
|
||||
#%patch22 -p1 -b .ice-leaks
|
||||
%patch33 -p1 -b .legacy-crash
|
||||
|
||||
%build
|
||||
|
||||
@ -180,6 +184,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu May 15 2008 Matthias Clasen <mclasen@redhat.com> - 2.23.2.2-2
|
||||
- Don't crash while handling legacy sessions
|
||||
|
||||
* Wed May 14 2008 Matthias Clasen <mclasen@redhat.com> - 2.23.2.2-1
|
||||
- Update to 2.23.2.2
|
||||
|
||||
|
29
legacy-crash.patch
Normal file
29
legacy-crash.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff -up gnome-session-2.23.2.2/gnome-session/session.c.legacy-crash gnome-session-2.23.2.2/gnome-session/session.c
|
||||
--- gnome-session-2.23.2.2/gnome-session/session.c.legacy-crash 2008-05-15 19:46:02.000000000 -0400
|
||||
+++ gnome-session-2.23.2.2/gnome-session/session.c 2008-05-15 19:47:48.000000000 -0400
|
||||
@@ -152,8 +152,13 @@ out:
|
||||
static void
|
||||
append_app (GsmSession *session, GsmApp *app)
|
||||
{
|
||||
- const char *basename = gsm_app_get_basename (app);
|
||||
- GsmApp *dup = g_hash_table_lookup (session->apps_by_name, basename);
|
||||
+ const char *basename;
|
||||
+ GsmApp *dup = NULL;
|
||||
+
|
||||
+ basename = gsm_app_get_basename (app);
|
||||
+
|
||||
+ if (basename)
|
||||
+ dup = g_hash_table_lookup (session->apps_by_name, basename);
|
||||
|
||||
if (dup)
|
||||
{
|
||||
@@ -163,7 +168,8 @@ append_app (GsmSession *session, GsmApp
|
||||
}
|
||||
|
||||
session->apps = g_slist_append (session->apps, app);
|
||||
- g_hash_table_insert (session->apps_by_name, g_strdup (basename), app);
|
||||
+ if (basename)
|
||||
+ g_hash_table_insert (session->apps_by_name, g_strdup (basename), app);
|
||||
}
|
||||
|
||||
static void
|
Loading…
Reference in New Issue
Block a user