[gnome-software/wip/hughsie/no-global-cache: 2/8] trivial: Do not show critical warning if getting the os-release app failed



commit 27d3bf8d39351d2ebe4ea26e599d1ce828a90a8e
Author: Richard Hughes <richard hughsie com>
Date:   Thu Feb 22 14:34:01 2018 +0000

    trivial: Do not show critical warning if getting the os-release app failed

 src/gs-updates-page.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index c6abd31a..f478b8e5 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -1103,6 +1103,11 @@ gs_updates_page_get_system_finished_cb (GObject *source_object,
 
        /* show or hide the end of life notification */
        app = gs_plugin_loader_get_system_app (plugin_loader);
+       if (app == NULL) {
+               g_warning ("failed to get system app");
+               gtk_widget_set_visible (self->box_end_of_life, FALSE);
+               return;
+       }
        if (gs_app_get_state (app) != AS_APP_STATE_UNAVAILABLE) {
                gtk_widget_set_visible (self->box_end_of_life, FALSE);
                return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]