[gnome-software] shell-extensions: Return an error from _setup() when GNOME Shell is not running



commit 165d6110498115a42668363a1f27fee73f163eba
Author: Richard Hughes <richard hughsie com>
Date:   Wed Dec 6 09:46:33 2017 +0000

    shell-extensions: Return an error from _setup() when GNOME Shell is not running

 .../shell-extensions/gs-plugin-shell-extensions.c  |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/shell-extensions/gs-plugin-shell-extensions.c 
b/plugins/shell-extensions/gs-plugin-shell-extensions.c
index beb1fdb..401885d 100644
--- a/plugins/shell-extensions/gs-plugin-shell-extensions.c
+++ b/plugins/shell-extensions/gs-plugin-shell-extensions.c
@@ -284,7 +284,10 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
        /* not running under Shell */
        name_owner = g_dbus_proxy_get_name_owner (priv->proxy);
        if (name_owner == NULL) {
-               g_clear_object (&priv->proxy);
+               g_set_error_literal (error,
+                                    GS_PLUGIN_ERROR,
+                                    GS_PLUGIN_ERROR_NOT_SUPPORTED,
+                                    "gnome-shell is not running");
                return FALSE;
        }
 


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