[gnome-software] trivial: Use g_clear_object in Flatpak's gs_plugin_destroy
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Use g_clear_object in Flatpak's gs_plugin_destroy
- Date: Tue, 31 May 2016 13:19:56 +0000 (UTC)
commit 5cfb92fc282fc674830ffb10e470f76b4a6f19fc
Author: Joaquim Rocha <jrocha endlessm com>
Date: Tue May 31 13:42:26 2016 +0200
trivial: Use g_clear_object in Flatpak's gs_plugin_destroy
src/plugins/gs-plugin-flatpak.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/gs-plugin-flatpak.c b/src/plugins/gs-plugin-flatpak.c
index 1a17893..cfd8eb6 100644
--- a/src/plugins/gs-plugin-flatpak.c
+++ b/src/plugins/gs-plugin-flatpak.c
@@ -56,10 +56,8 @@ void
gs_plugin_destroy (GsPlugin *plugin)
{
GsPluginData *priv = gs_plugin_get_data (plugin);
- if (priv->installation != NULL)
- g_object_unref (priv->installation);
- if (priv->monitor != NULL)
- g_object_unref (priv->monitor);
+ g_clear_object (&priv->installation);
+ g_clear_object (&priv->monitor);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]