[gnome-software] 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] overview page: Fix a crash when we have no featured apps
- Date: Tue, 2 Jan 2018 21:36:34 +0000 (UTC)
commit c1875938cca009c74708ec8c8c6d989a1c75665e
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 a7b677b..ddbe3d6 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]