[gnome-software] plugin loader: Fix a crash in gs_plugin_loader_helper_free
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] plugin loader: Fix a crash in gs_plugin_loader_helper_free
- Date: Wed, 10 Jan 2018 12:58:53 +0000 (UTC)
commit 0c0e6b22047c174099e4f9b89a439968d4e50078
Author: Kalev Lember <klember redhat com>
Date: Wed Jan 10 13:44:53 2018 +0100
plugin loader: Fix a crash in gs_plugin_loader_helper_free
Don't unconditionally dereference an app associated with a plugin job,
without checking first that it's non-NULL.
https://bugzilla.redhat.com/show_bug.cgi?id=1515467
lib/gs-plugin-loader.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 7247090..d5cb758 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -210,7 +210,11 @@ gs_plugin_loader_helper_free (GsPluginLoaderHelper *helper)
case GS_PLUGIN_ACTION_INSTALL:
case GS_PLUGIN_ACTION_REMOVE:
case GS_PLUGIN_ACTION_UPDATE:
- gs_app_set_progress (gs_plugin_job_get_app (helper->plugin_job), 0);
+ {
+ GsApp *app = gs_plugin_job_get_app (helper->plugin_job);
+ if (app != NULL)
+ gs_app_set_progress (app, 0);
+ }
break;
default:
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]