[gnome-software: 1/72] gs-plugin-loader: Don’t try to shut down plugins which aren’t enabled
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 1/72] gs-plugin-loader: Don’t try to shut down plugins which aren’t enabled
- Date: Wed, 15 Dec 2021 13:00:54 +0000 (UTC)
commit f37cb06140e5036a9e191c053580d8514540f5bb
Author: Philip Withnall <pwithnall endlessos org>
Date: Wed Dec 8 10:48:17 2021 +0000
gs-plugin-loader: Don’t try to shut down plugins which aren’t enabled
We should only call shutdown if setup has been called successfully.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
lib/gs-plugin-loader.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 0d3ce396a..8148316cb 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -2486,6 +2486,9 @@ gs_plugin_loader_call_shutdown (GsPluginLoader *plugin_loader,
for (guint i = 0; i < plugin_loader->plugins->len; i++) {
GsPlugin *plugin = GS_PLUGIN (plugin_loader->plugins->pdata[i]);
+ if (!gs_plugin_get_enabled (plugin))
+ continue;
+
if (GS_PLUGIN_GET_CLASS (plugin)->shutdown_async != NULL) {
GS_PLUGIN_GET_CLASS (plugin)->shutdown_async (plugin, cancellable,
plugin_shutdown_cb, &shutdown_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]