[gnome-software] trivial: Fix a crash on destroy when *not* using the dummy plugin
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Fix a crash on destroy when *not* using the dummy plugin
- Date: Fri, 9 Sep 2016 08:09:20 +0000 (UTC)
commit 0d3371aa57b3f8eb0f16fbf2330261c999580174
Author: Richard Hughes <richard hughsie com>
Date: Fri Sep 9 09:09:02 2016 +0100
trivial: Fix a crash on destroy when *not* using the dummy plugin
src/plugins/gs-plugin-dummy.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-dummy.c b/src/plugins/gs-plugin-dummy.c
index be5655d..dfcb43f 100644
--- a/src/plugins/gs-plugin-dummy.c
+++ b/src/plugins/gs-plugin-dummy.c
@@ -79,7 +79,8 @@ gs_plugin_destroy (GsPlugin *plugin)
GsPluginData *priv = gs_plugin_get_data (plugin);
if (priv->quirk_id > 0)
g_source_remove (priv->quirk_id);
- g_object_unref (priv->cached_origin);
+ if (priv->cached_origin != NULL)
+ g_object_unref (priv->cached_origin);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]