changeset 22827:5c9d9df219af

Fix a compiler warning. Sadrul or someone should double-check this.
author Richard Laager <rlaager@wiktel.com>
date Tue, 06 May 2008 05:10:40 +0000
parents 66914f306712
children 729a340375fa
files finch/gntrequest.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntrequest.c	Mon May 05 22:39:55 2008 +0000
+++ b/finch/gntrequest.c	Tue May 06 05:10:40 2008 +0000
@@ -104,7 +104,8 @@
 static GntWidget *
 setup_button_box(GntWidget *win, gpointer userdata, gpointer cb, gpointer data, ...)
 {
-	GntWidget *box, *button;
+	GntWidget *box;
+	GntWidget *button = NULL;
 	va_list list;
 	const char *text;
 	gpointer callback;
@@ -124,7 +125,8 @@
 		g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(cb), data);
 	}
 
-	g_object_set_data(G_OBJECT(button), "cancellation-function", GINT_TO_POINTER(TRUE));
+	if (button)
+		g_object_set_data(G_OBJECT(button), "cancellation-function", GINT_TO_POINTER(TRUE));
 
 	va_end(list);
 	return box;