changeset 20719:2354c9748a66

Do not connect to a signal with a NULL callback. Gets rid of a runtime warning.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 30 Sep 2007 02:11:37 +0000
parents 803f0ee0c231
children f653af2d4659
files finch/gntrequest.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntrequest.c	Sat Sep 29 20:49:34 2007 +0000
+++ b/finch/gntrequest.c	Sun Sep 30 02:11:37 2007 +0000
@@ -76,6 +76,8 @@
 static void
 setup_default_callback(GntWidget *window, gpointer default_cb, gpointer data)
 {
+	if (default_cb == NULL)
+		return;
 	g_object_set_data(G_OBJECT(window), "default-callback", default_cb);
 	g_signal_connect_swapped(G_OBJECT(window), "destroy", G_CALLBACK(default_cb), data);
 }