[gnome-software/gnome-3-26] overview page: Fix a crash when we have no featured apps
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-26] overview page: Fix a crash when we have no featured apps
- Date: Mon, 8 Jan 2018 20:31:02 +0000 (UTC)
commit 1245398b11350243691a02ec637836fec3a1c268
Author: Kalev Lember <klember redhat com>
Date: Tue Jan 2 22:32:57 2018 +0100
overview page: Fix a crash when we have no featured apps
Reorder the code to avoid crashing in that case.
Should fix https://retrace.fedoraproject.org/faf/problems/3186298/
src/gs-overview-page.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index 385c29e..b1bc95a 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -368,12 +368,6 @@ gs_overview_page_get_featured_cb (GObject *source_object,
if (g_error_matches (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_CANCELLED))
goto out;
- if (g_getenv ("GNOME_SOFTWARE_FEATURED") == NULL) {
- /* Don't show apps from the category that's currently featured as the category of the day */
- gs_app_list_filter (list, filter_category, priv->category_of_day);
- gs_app_list_randomize (list);
- }
-
gtk_widget_hide (priv->featured_heading);
gs_container_remove_all (GTK_CONTAINER (priv->bin_featured));
if (list == NULL) {
@@ -387,6 +381,12 @@ gs_overview_page_get_featured_cb (GObject *source_object,
goto out;
}
+ if (g_getenv ("GNOME_SOFTWARE_FEATURED") == NULL) {
+ /* Don't show apps from the category that's currently featured as the category of the day */
+ gs_app_list_filter (list, filter_category, priv->category_of_day);
+ gs_app_list_randomize (list);
+ }
+
/* at the moment, we only care about the first app */
app = gs_app_list_index (list, 0);
tile = gs_feature_tile_new (app);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]