Commit b3af732e authored by Richard Hughes's avatar Richard Hughes
Browse files

shell-extensions: Disable the plugin if we can't get the current shell version

This may explain the thousands of critical warnings and memory explosion in
https://gitlab.gnome.org/GNOME/gnome-software/issues/486

Relevant parts of the log:

    json_object_has_member: assertion 'member_name != NULL' failed
    g_strsplit: assertion 'string != NULL' failed
    g_strv_length: assertion 'str_array != NULL' failed
parent 955459cd
......@@ -305,8 +305,14 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
/* get the GNOME Shell version */
version = g_dbus_proxy_get_cached_property (priv->proxy,
"ShellVersion");
if (version != NULL)
priv->shell_version = g_variant_dup_string (version, NULL);
if (version == NULL) {
g_set_error_literal (error,
GS_PLUGIN_ERROR,
GS_PLUGIN_ERROR_NOT_SUPPORTED,
"unable to get shell version");
return FALSE;
}
priv->shell_version = g_variant_dup_string (version, NULL);
return TRUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment