[gnome-packagekit/gnome-3-0] trivial: fix up a warning spotted by clang



commit 7aa01e287b96b4bca4311f31e55ccb940beb1385
Author: Richard Hughes <richard hughsie com>
Date:   Mon May 23 21:25:20 2011 +0100

    trivial: fix up a warning spotted by clang

 src/gpk-log.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gpk-log.c b/src/gpk-log.c
index 7d66831..27d46c8 100644
--- a/src/gpk-log.c
+++ b/src/gpk-log.c
@@ -813,7 +813,7 @@ main (int argc, char *argv[])
 	gboolean ret;
 	gint status = 1;
 	GOptionContext *context;
-	GtkApplication *application;
+	GtkApplication *application = NULL;
 
 	const GOptionEntry options[] = {
 		{ "filter", 'f', 0, G_OPTION_ARG_STRING, &filter,
@@ -865,6 +865,7 @@ main (int argc, char *argv[])
 out:
 	if (builder != NULL)
 		g_object_unref (builder);
-	g_object_unref (application);
+	if (application != NULL)
+		g_object_unref (application);
 	return status;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]