- Fix crash with --desktop mode when clicking volume icon (bug 607069)

This commit is contained in:
Mamoru Tasaka 2010-06-24 17:57:51 +00:00
parent d51ea22e06
commit a740c3cacc
2 changed files with 44 additions and 2 deletions

View File

@ -0,0 +1,35 @@
diff --git a/src/base/fm-file-launcher.c b/src/base/fm-file-launcher.c
index 1b496d7..58c12ec 100644
--- a/src/base/fm-file-launcher.c
+++ b/src/base/fm-file-launcher.c
@@ -119,7 +119,7 @@ gboolean fm_launch_files(GAppLaunchContext* ctx, GList* file_infos, FmFileLaunch
{
if(launcher->error)
launcher->error(ctx, err, user_data);
- g_error_free(err);
+ if (err) g_error_free(err);
err = NULL;
}
continue;
@@ -202,7 +202,7 @@ gboolean fm_launch_files(GAppLaunchContext* ctx, GList* file_infos, FmFileLaunch
l->data = uri;
}
fis = g_list_reverse(fis);
- g_app_info_launch_uris(app, fis, ctx, err);
+ g_app_info_launch_uris(app, fis, ctx, &err);
/* free URI strings */
g_list_foreach(fis, (GFunc)g_free, NULL);
g_object_unref(app);
diff --git a/src/gtk/fm-gtk-utils.c b/src/gtk/fm-gtk-utils.c
index 12ca7b6..b670765 100644
--- a/src/gtk/fm-gtk-utils.c
+++ b/src/gtk/fm-gtk-utils.c
@@ -587,7 +587,7 @@ static gboolean on_launch_error(GAppLaunchContext* ctx, GError* err, gpointer us
{
gpointer* data = (gpointer*)user_data;
GtkWindow* parent = (GtkWindow*)data[0];
- fm_show_error(parent, err->message);
+ if (err) fm_show_error(parent, err->message);
return TRUE;
}

View File

@ -5,7 +5,7 @@
Name: libfm Name: libfm
Version: 0.1.12 Version: 0.1.12
Release: 3%{?dist} Release: 4%{?dist}
Summary: GIO-based library for file manager-like programs Summary: GIO-based library for file manager-like programs
Group: System Environment/Libraries Group: System Environment/Libraries
@ -15,12 +15,14 @@ Source0: http://downloads.sourceforge.net/pcmanfm/%{name}-%{version}.tar.
# Fedora specific patches # Fedora specific patches
Patch0: libfm-0.1.9-pref-apps.patch Patch0: libfm-0.1.9-pref-apps.patch
# Patches already in git # Patches already in git
#
# Patches need discussing with the upstream # Patches need discussing with the upstream
# Upstream bug 3009374, sorting by name broken in cs_CZ.UTF-8 # Upstream bug 3009374, sorting by name broken in cs_CZ.UTF-8
Patch1: libfm-0.1.12-sort-in-cs_CZ.UTF-8.patch Patch1: libfm-0.1.12-sort-in-cs_CZ.UTF-8.patch
# Upstream bug 3012747, pcmanfm // crashes # Upstream bug 3012747, pcmanfm // crashes
Patch2: libfm-0.1.12-filen-begin-with-slasla.patch Patch2: libfm-0.1.12-filen-begin-with-slasla.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Fedora bug 607069, pcmanfm --desktop crashes when clicking volume icon
Patch3: libfm-0.1.12-crash-on-click-on-volume-entry-on-desktop-patch
BuildRequires: gtk2-devel >= 2.16.0 BuildRequires: gtk2-devel >= 2.16.0
BuildRequires: menu-cache-devel >= 0.3.2 BuildRequires: menu-cache-devel >= 0.3.2
@ -85,6 +87,7 @@ developing applications that use %{name}-gtk.
%patch0 -p1 -b .orig %patch0 -p1 -b .orig
%patch1 -p1 -b .sort_cs %patch1 -p1 -b .sort_cs
%patch2 -p1 -b .slasla %patch2 -p1 -b .slasla
%patch3 -p1 -b .desk_vol
# treak rpath # treak rpath
sed -i.libdir_syssearch -e \ sed -i.libdir_syssearch -e \
@ -191,6 +194,10 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%changelog %changelog
* Fri Jun 25 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.1.12-4
- Fix crash with --desktop mode when clicking volume icon
(bug 607069)
* Thu Jun 10 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.1.12-3 * Thu Jun 10 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.1.12-3
- Fix an issue that pcmanfm // crashes (upstream bug 3012747) - Fix an issue that pcmanfm // crashes (upstream bug 3012747)