Backport a crash fix

This commit is contained in:
Kalev Lember 2015-02-19 22:31:27 +01:00
parent ee1b97d9a0
commit d00ff84ad8
2 changed files with 61 additions and 1 deletions

View File

@ -0,0 +1,55 @@
From 02ae8c3193aa6bdd459fdf5382a48f38d83ae33e Mon Sep 17 00:00:00 2001
From: Kalev Lember <kalevlember@gmail.com>
Date: Thu, 19 Feb 2015 22:22:46 +0100
Subject: [PATCH] extras: Fix a crash when reloading the page
Make gs_shell_extras_reload() a noop when we have no contents for the
page.
Thanks to Rafal Luzynski for spotting this!
---
src/gs-shell-extras.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gs-shell-extras.c b/src/gs-shell-extras.c
index cdd8211..474bf27 100644
--- a/src/gs-shell-extras.c
+++ b/src/gs-shell-extras.c
@@ -721,7 +721,8 @@ gs_shell_extras_load (GsShellExtras *shell_extras, GPtrArray *array_search_data)
void
gs_shell_extras_reload (GsShellExtras *shell_extras)
{
- gs_shell_extras_load (shell_extras, NULL);
+ if (priv->array_search_data != NULL)
+ gs_shell_extras_load (shell_extras, NULL);
}
static void
--
2.3.0
From fae08193f7e4eb1f9930bdca2d856683660e8c74 Mon Sep 17 00:00:00 2001
From: Kalev Lember <kalevlember@gmail.com>
Date: Thu, 19 Feb 2015 22:32:57 +0100
Subject: [PATCH] Fix the build
---
src/gs-shell-extras.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gs-shell-extras.c b/src/gs-shell-extras.c
index 474bf27..349a788 100644
--- a/src/gs-shell-extras.c
+++ b/src/gs-shell-extras.c
@@ -721,6 +721,8 @@ gs_shell_extras_load (GsShellExtras *shell_extras, GPtrArray *array_search_data)
void
gs_shell_extras_reload (GsShellExtras *shell_extras)
{
+ GsShellExtrasPrivate *priv = shell_extras->priv;
+
if (priv->array_search_data != NULL)
gs_shell_extras_load (shell_extras, NULL);
}
--
2.3.0

View File

@ -7,7 +7,7 @@
Summary: A software center for GNOME Summary: A software center for GNOME
Name: gnome-software Name: gnome-software
Version: 3.15.90 Version: 3.15.90
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
Group: Applications/System Group: Applications/System
URL: https://wiki.gnome.org/Apps/Software URL: https://wiki.gnome.org/Apps/Software
@ -15,6 +15,7 @@ Source0: http://download.gnome.org/sources/gnome-software/3.15/%{name}-%{versi
# Downstream patch to the list of unremovable system apps # Downstream patch to the list of unremovable system apps
Patch0: gnome-software-system-apps.patch Patch0: gnome-software-system-apps.patch
Patch1: 0001-extras-Fix-a-crash-when-reloading-the-page.patch
Requires: appstream-data Requires: appstream-data
%if 0%{?fedora} %if 0%{?fedora}
@ -51,6 +52,7 @@ and update software in the GNOME desktop.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .system-apps %patch0 -p1 -b .system-apps
%patch1 -p1
%build %build
%configure --disable-static %configure --disable-static
@ -109,6 +111,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/gnome-software/modulesets.d/*.xml %{_datadir}/gnome-software/modulesets.d/*.xml
%changelog %changelog
* Thu Feb 19 2015 Kalev Lember <kalevlember@gmail.com> - 3.15.90-2
- Backport a crash fix
* Tue Feb 17 2015 Richard Hughes <rhughes@redhat.com> - 3.15.90-1 * Tue Feb 17 2015 Richard Hughes <rhughes@redhat.com> - 3.15.90-1
- Update to 3.15.90 - Update to 3.15.90